Java.io.EOFException while returning a large object using RMI

Hello
I am having an issue with RMI which seems to be quite common (given the given the amount of matches in Google) but for which I can find a way out.
In my application there 2 RMI objects , say OBJECT1 and OBJECT2. For OBJECT1 to get stuff from the database it gives a call to OBJECT2, which in turn fetches it from the DB and provides it back to OBJECT1.
It is in such a call from OBJECT1 that i get the following exception.
Caused by: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.EOFException
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:164)
at CALL FROM OBJECT1
... 13 more
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.readFully(ObjectInputStream.java:2571)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1824)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1759)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1603)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1835)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1759)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:322)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:297)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:146)
... 15 more
The rows retrieved from the DB are stored in a user-defined array (serializable incl. all the subcomponents except for the primitive data fields) and the same is return back from OBJECT2.
Interesting thing is that this exception occurs only when the number of rows retrieved by OBJECT2 is exceeds a certain limit, i.e. when the no. of rows are less the application works perfectly.
Tried the following based on what was mentioned in different posts: Added following parameters to the JVM startup call.
-Dsun.rmi.server.exceptionTrace=true - did not get any pointers
-Dsun.rmi.log.debug=true
-Dsun.rmi.transport.connectionTimeout=600000 - cause the time for the DB query was above the default time of 15 sec
I am using Sun j2sdk1.4.2_13 for the application.
Any pointers to resolve this issue would be greatly appreciated.

ronpg wrote:
The issue is solved by increasing the VM max. memory parameters!if you want to avoid issues like this in the future, check out RMIIO. it provides an api for a "streaming remote iterator" over rmi, so you wouldn't have too read all this data into memory at once (causing memory exhaustion issues).

Similar Messages

  • Getting "java.io.EOFException" while reading a file

    I am getting this error when trying to upload a file through the html form to the server.
    I am using Struts form and the FormFile to get the file contents. After getting the file contents I write to a file in the server path. This works perfectly with WebSphere4.0.
    When I deploy my application in Websphere 6.0 cluster environment I get the following error.
    java.io.EOFException
         at java.io.DataInputStream.readFully(DataInputStream.java(Compiled Code))
         at java.io.DataInputStream.readInt(DataInputStream.java(Compiled Code))
         at java.io.ObjectInputStream$BlockDataInputStream.readInt(ObjectInputStream.java(Inlined Compiled Code))
         at java.io.ObjectInputStream.readInt(ObjectInputStream.java(Compiled Code))
         at com.ibm.ws.webcontainer.httpsession.HttpSessDRSBuffWrapper.readExternal(HttpSessDRSBuffWrapper.java(Compiled Code))
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
         at java.util.Hashtable.readObject(Hashtable.java(Compiled Code))
         at sun.reflect.GeneratedMethodAccessor1637.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
         at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
         at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java(Compiled Code))
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
         at com.ibm.ws.drs.message.DRSCacheMsgImpl.readExternal(DRSCacheMsgImpl.java(Compiled Code))
         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java(Compiled Code))
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java(Compiled Code))
         at com.ibm.ws.drs.message.DRSMessageHelper.extractDCM(DRSMessageHelper.java(Compiled Code))
         at com.ibm.ws.drs.ha.DRSAgentClassEvents$2.run(DRSAgentClassEvents.java(Compiled Code))
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
    Any help is appreciated.
    Thanks
    Ganesh...

    while((obj=input.readObject())!=null)and what's this test for? Where does it say that readObject() can return null? Is it really the correct test for what you're testing for?

  • Java.io.EOFException while deploying RPD in OBIEE Cluster using Mbean

    I am using oracle.biee.admin:type=BIDomain.BIInstance.ServerConfiguration,biInstance=coreapplication,group=Service to deploy RPD on a clustered environment with 3 servers, I get the following error, it works fine on a single host, any clue ?
    Connecting using URL: service:jmx:t3://xxxxxxx/jndi/weblogic.management.mbeanservers.domainruntime ...
    Transaction addAvayaRepository failed with error: ; nested exception is:
    java.io.EOFException, review log to fix issue and re-execute.
    weblogic.rjvm.PeerGoneException: ; nested exception is:
    java.io.EOFException
            at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:237)
            at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:223)
            at javax.management.remote.rmi.RMIConnectionImpl_1036_WLStub.invoke(Unknown Source)
            at weblogic.management.remote.common.RMIConnectionWrapper$16.run(ClientProviderBase.java:918)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
            at weblogic.security.Security.runAs(Security.java:61)
            at weblogic.management.remote.common.RMIConnectionWrapper.invoke(ClientProviderBase.java:916)
            at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:1017)
            at com.avaya.reporting.bi.config.MBeanTransaction.invoke(MBeanTransaction.java:374)
            at com.avaya.reporting.bi.config.MBeanTransaction.invoke(MBeanTransaction.java:349)
            at com.avaya.reporting.bi.config.MBeanTransaction.doDomainCall(MBeanTransaction.java:314)
            at com.avaya.reporting.bi.config.MBeanTransaction.lockDomain(MBeanTransaction.java:290)
            at com.avaya.reporting.bi.config.MBeanTransaction.execute(MBeanTransaction.java:200)
            at com.avaya.reporting.bi.config.MBeanConfigExecutor.execute(MBeanConfigExecutor.java:147)
            at com.avaya.reporting.bi.config.RunBIConfig.runXmlTransaction(RunBIConfig.java:127)
            at com.avaya.reporting.bi.config.RunBIConfig.runConfig(RunBIConfig.java:99)
            at com.avaya.reporting.bi.config.RunBIConfig.main(RunBIConfig.java:84)
    Caused by: java.io.EOFException
            at weblogic.rjvm.t3.MuxableSocketT3.endOfStream(MuxableSocketT3.java:345)
            at weblogic.socket.SocketMuxer.deliverExceptionAndCleanup(SocketMuxer.java:827)
            at weblogic.socket.SocketMuxer.deliverEndOfStream(SocketMuxer.java:761)
            at weblogic.socket.SocketMuxer.readReadySocketOnce(SocketMuxer.java:958)
            at weblogic.socket.SocketMuxer.readReadySocket(SocketMuxer.java:889)
            at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:339)
            at weblogic.socket.SocketReaderRequest.run(SocketReaderRequest.java:29)
            at weblogic.work.ExecuteRequestAdapter.execute(ExecuteRequestAdapter.java:21)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:145)
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:117)

    Thanks for your replies !!
    In any of the RPD deployments I'm getting the same error , not for some particular RPD .
    FYI , yesterday (before this issue) I had a issue with starting presentation services , so as adviced in forum I replaced the files sawguidstate and sawguidstate.atrin the location:
    <Instance_Home>\instances\<instance_name>\bifoundation\OracleBIPresentationServicesComponent\coreapplication_obips1\catalog\<project>\root\system\mktgcache\<name>
    with the same files from a backup or from another working OBIEE 11g (11.1.5)instance.
    plese refer : Re: Unable to start presentation services , in OBIEE 11g
    Is this causing the deployment issue ?

  • Accessing Large object Using DB_LINK

    Hi,
    Can we access large objects like CLOB and BLOB using db_link in oracle 10g? I know that it is not possible in oracle 9i and lower version.

    user10768613 wrote:
    Hi,
    Can we access large objects like CLOB and BLOB using db_link in oracle 10g? I know that it is not possible in oracle 9i and lower version.In short No, you still can't.

  • Access very large objects using servlets from database

    hai,
    Please suggest me to access a very large object, for example an image file, from the database using servlets.
    Thanks!
    null

    hai,
    Please suggest me to access a very large object, for example an image file, from the database using servlets.
    Thanks!
    null

  • RequestTimeoutException error while invoking a BPEL process using RMI

    Hi,
    I am getting RequestTimeoutException error while invoking a BPEL process using this code:
    Locator locator = LocatorFactory.createLocator(jndiProps);
    String compositeDN = "default/"+processName+"!1.0";
    Composite composite = locator.lookupComposite(compositeDN);
    String serviceName = "client";
    Service deliveryService = composite.getService(serviceName);
    NormalizedMessage nm = new NormalizedMessageImpl();
    nm.getPayload().put("payload", requestXml);
    NormalizedMessage res = deliveryService.request("process", nm);
    responseMap = res.getPayload();
    The error stack trace is
    weblogic.rmi.extensions.RequestTimeoutException: RJVM response from 'weblogic.rjvm.RJVMImpl@604f2d14 - id: '-361032376059206
    2776S:10.67.232.164:[8001,-1,-1,-1,-1,-1,-1]:emaar_domain:soa_server1' connect time: 'Mon Jan 18 11:34:41 GST 2010'' for 'executeServiceMethod
    (Loracle.soa.management.CompositeDN;Ljava.lang.String;Ljava.lang.String;[Ljava.lang.Object;) 'timed out after: 60000ms.
    oracle.fabric.common.FabricInvocationException: weblogic.rmi.extensions.RequestTimeoutException: RJVM response from 'weblogic.rjvm.RJVMImpl@60
    4f2d14 - id: '-3610323760592062776S:10.67.232.164:[8001,-1,-1,-1,-1,-1,-1]:emaar_domain:soa_server1' connect time: 'Mon Jan 18 11:34:41 GST 20
    10'' for 'executeServiceMethod(Loracle.soa.management.CompositeDN;Ljava.lang.String;Ljava.lang.String;[Ljava.lang.Object;) 'timed out after: 6
    0000ms.
            at oracle.soa.management.internal.facade.ServiceImpl.request(ServiceImpl.java:135)
            at com.gss.common.bo.BpelUtil.invokeBPELProcess(BpelUtil.java:81)
    To add to it the BPEL process is executing successfuly and RMI call timeout is happening.
    Can I know how to increase the related timeout value?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Have got the same problem. Scenario at my end is little different though.
    I am trying to invoke a BPEL process from an ESB Service.
    I am trying to look into it..
    However, would be grateful, if someone can give some insight into this since many are running into this issue without being able to fix.
    Ashish.

  • JAVA&SOAP:how to return a complex object( the object has an object within)

    Lets say my Complex object is :
    public class PersonWithAddress {
    private String name;
    private int ssn ;
    private Address add;
    PersonWithAddress() {
    name="Gagan Tandon" ;
    ssn =1111;
    add = new Address("1113","WestPlum Street");
    public String getName() {
    return name;
    public int getSSN() {
    return ssn;
    public Address getAddress() {
    return add;
    This complex object has Address object embedded in it.
    public class Address {
    private String house;
    private String street;
    public Address (String myHouse,String myStreet) {
    house = myHouse;
    street = myStreet;
    public String getHouse() {
    return house;
    public String getStreet() {
    return street;
    My deployment Descriptor is as following: check the mappings part.
    <isd:service xmlns:isd=
    "http://xml.apache.org/xml-soap/deployment"
    id="urn:xml-soap-person-demo">
    <isd:provider type="java"
    scope="Application"
    methods="getPersonWithAddress">
    <isd:java class="PersonServer"/>
    </isd:provider>
    <isd:faultListener>
    org.apache.soap.server.DOMFaultListener
    </isd:faultListener>
    <isd:mappings>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:PersonWithAddress"
    javaType="PersonWithAddress"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    <isd:map
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:x="urn:xml-soap-person-demo" qname="x:Address"
    javaType="Address"
    java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
    xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
    </isd:mappings>
    </isd:service>
    And in my SOAPRPC code at client end calls the following: check the mappingregistry code...
    String serverHost = "http://localhost:8082/soap/servlet/rpcrouter";
    SOAPMappingRegistry smr = new SOAPMappingRegistry();
    Parameter p= null;
    try {
    System.out.println("here 0");
    Response r=null;
    Call c=new Call();
    Vector parameters = new Vector();
    System.out.println("here 1");
    c.setTargetObjectURI ("urn:xml-soap-person-demo");
    c.setMethodName ("getPersonWithAddress");
    System.out.println("here 3");
    c.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
    // parameters.addElement (new Parameter("name", String.class, "Web Services Client", null));
    // c.setParams (parameters);
    c.setSOAPMappingRegistry(smr);
    BeanSerializer beanSer = new BeanSerializer();
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","Address"),Address.class,beanSer,beanSer);
    smr.mapTypes(Constants.NS_URI_SOAP_ENC,new QName("urn:xml-soap-person-demo","PersonWithAddress"),PersonWithAddress.class,beanSer,beanSer);
    try
    System.out.println("here 4");
    r = c.invoke ( new URL(serverHost), "" );
    // org.apache.soap.SOAPException can be thrown
    catch ( Exception e )
    e.printStackTrace();
    // Check the response.
    if (r.generatedFault ()) {
    Fault f = r.getFault();
    System.out.println ("Error Occurred: ");
    System.out.println (" Fault Code = " + f.getFaultCode());
    System.out.println (" Fault String = " + f.getFaultString());
    // return f.getFaultString();
    // return new String("gagan");
    return null;
    else {
    System.out.println("here 5");
    p = r.getReturnValue();
    System.out.println("here 6");
    // System.out.println( (String)greeting.getValue() );
    System.out.println("SSN: " + ((PersonWithAddress)p.getValue()).getSSN());
    return (PersonWithAddress) p.getValue();
    catch( Exception e ){
    e.printStackTrace();
    // finally {
    // return null;// String("not OK");
    if (p==null)
    return null;
    else
    return (PersonWithAddress) p.getValue();
    When running this code..
    The following error is thrown.
    System.out.println("here 4") is printed.
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""; targetException=java.lang.IllegalArgumentException: Unable to instantiate 'PersonWithAddress': Class org.apache.soap.encoding.soapenc.BeanSerializer can not access a member of class PersonWithAddress with modifiers ""]
    at org.apache.soap.rpc.Call.invoke(Call.java:294)
    at PersonClient.getPersonWithAddress(PersonClient.java:92)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    java.lang.NullPointerException
    at PersonClient.getPersonWithAddress(PersonClient.java:96)
    at PersonClient.<init>(PersonClient.java:11)
    at PersonClient.main(PersonClient.java:20)
    I am here 1
    Exception in thread "main" java.lang.NullPointerException
    at PersonClient.<init>(PersonClient.java:13)
    at PersonClient.main(PersonClient.java:20)
    What could be the problem..? Is there any info on net how could i pass complex objects of this type in Java through SOAP RPC.
    GAGAN

    Have you managed to sole the problem ? I have got similar one...
    [SOAPException: faultCode=SOAP-ENV:Client; msg=Unable to instantiate 'auction.common.Property': auction/common/Property]
         at proxy.soap.AuctionHistoryProxy.addAuctionProperty(AuctionHistoryProxy.java:515)
         at java.lang.reflect.Method.invoke(Native Method)
    (...)

  • ModuleException: Zip  java.io.EOFException

    I was trying to unzip the file using the ZIP module.
    The error message in the communication channel with NFS is "MP: exception caught with cause com.sap.aii.af.lib.mp.module.ModuleException: Zip: error occured during processing: java.io.EOFException"
    while using the ZIP module to unzip the file from PI server.
    Let me know what this error message suggests and how can this be fixed.

    Hi,
    Can you check the module parameters which you are specified in you communication channel
    Processing Sequence:
    u2022     Module Name: localejbs/AF_Modules/PayloadZipBean
    u2022     Module Type: Local Enterprise Bean
    u2022     Module Key: Any key name to handle Module Parameters
    Module Configuration:
    u2022     Parameter Name: zip.Mode
    u2022     Parameter Value: unzip
    regards,
    ganesh.

  • Java.io.EOFException in Object file transfer

    Greetings,
    I am having a problem sending a file across a network. At one point it was working, however I am not sure where along the way it became broken.
    Stack Trace:
    java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Sour
    ce)
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at WBServer.unpackVectors(WBServer.java:283)
    at fileListener.run(WBServer.java:374)
        public void getWBContent(String hid) throws java.rmi.RemoteException //<- Send all object vectors and relevant integers...
            setPageNum(pageCount-1);
            HID=hid;
            packVectors(null);
            new Thread() {
                public void run(){
                   try{javax.swing.SwingUtilities.invokeLater(
                   new Runnable(){
                       public void run(){
                            try{ //Yes...
                                java.net.Socket s = new java.net.Socket(HID, 1113); //<- Make a network port
                                java.io.BufferedWriter sos = new java.io.BufferedWriter(new java.io.OutputStreamWriter(s.getOutputStream())); //<-Open a stream
                                sos.write("vectordata.dat"); //<-Send the name of the file
                                sos.close(); //<- Close the stream
                                s.close(); //<- Close the port
                                String anchor = getClass().getResource("WBServer.class").getPath();
                                java.net.Socket ns = new java.net.Socket(HID, 1113); //<- Open a new port to the same place
                                java.io.FileInputStream fio = new java.io.FileInputStream(anchor.substring(0, anchor.lastIndexOf('/')+1)+"vectordata.dat"); //<- Open the file to stream
                                //java.io.DataInputStream dia = new java.io.DataInputStream(fio); //<- Open the stream to read
                                java.io.BufferedInputStream bia = new java.io.BufferedInputStream(fio);
                                java.io.BufferedOutputStream boa = new java.io.BufferedOutputStream(ns.getOutputStream());//<- Open the data stream for the port
                                int read=0; //<- Byte Read Counter
                                byte[] fbuffer = new byte[1024]; //<- Byte Read Buffer
                                boolean EOF=false;
                                while(!EOF){ //<- Until we reach the end of the stream...
                                    try{read=bia.read(fbuffer);
                                    boa.write(fbuffer, 0, read);} //<- ...send the number of bytes stored in the buffer at the time.
                                    catch(java.io.EOFException e){ EOF=true;}
                                boa.flush(); //<- Make sure the stream is cleared
                                boa.close(); //<- Close the port's stream
                                bia.close(); //<- Close the reading stream
                                fio.close(); //<- Close the file's stream
                                ns.close(); //<- Close the port...
                            catch(Exception e)
                            {SimpleFormatter sf = new SimpleFormatter();
                             LogRecord tempLog = new LogRecord(Level.WARNING, "File Send Error: "+e.toString());
                             sf.format(tempLog);
                             logFile.publish(tempLog);}
                    catch(Exception e)
                    {SimpleFormatter sf = new SimpleFormatter();
                     LogRecord tempLog = new LogRecord(Level.WARNING, "Error running getWBContent() send file thread: "+e.toString());
                     sf.format(tempLog);
                     logFile.publish(tempLog);}
                }}.start();
        public void packVectors(String filePath) {   //This function writes all the objects in memory to a file for transport.
            String anchor = getClass().getResource("WBServer.class").getPath();
            if(filePath==null){filePath=anchor.substring(0, anchor.lastIndexOf('/')+1)+"data/vectordata.dat";}
            System.out.println("From packVectors(): "+filePath);
            java.io.File ovFile = new java.io.File(filePath); //Setup out data file
            try{if(!ovFile.exists()){ovFile.createNewFile();}else{ovFile.delete(); ovFile.createNewFile();} //If it's not there...make one. If it is, delete it and make a new one.
            java.io.ObjectOutputStream oojStream = new java.io.ObjectOutputStream(new java.io.FileOutputStream(ovFile)); //Ready the writer for writingness.
            oojStream.writeObject(PageHolder); //Pages to file...
            oojStream.writeObject(ImgPage); //Images for the Pages to file...
            oojStream.writeObject(WBStack); //Current object stack to file...
            oojStream.writeInt(objCount); //Current object count to file...
            oojStream.writeInt(pageCount); //Current page count to file...
            oojStream.writeInt(pageCount-1); //Current page number to file...
            oojStream.flush(); //<-Commit final write operations...
            oojStream.close();} //<- Close the file...
            catch(Exception e)
            {SimpleFormatter s = new SimpleFormatter();
             LogRecord tempLog = new LogRecord(Level.WARNING, "Persistence save error: "+e.toString());
             s.format(tempLog);
             e.printStackTrace();
             logFile.publish(tempLog);}
        public void unpackVectors(String filePath) {   //This function reads objects from a file that was previously written by packVectors().
            String anchor = getClass().getResource("WBServer.class").getPath();
            if(filePath==null){filePath=anchor.substring(0, anchor.lastIndexOf('/')+1)+"data/vectordata.dat";}
            System.out.println("From unpackVectors(): "+filePath);
            java.io.File ivFile = new java.io.File(filePath); //Setup the file to read from.
            try{if(!ivFile.exists()){ //If the file doesn't exist, we're screwed...
                SimpleFormatter s = new SimpleFormatter();
                LogRecord tempLog = new LogRecord(Level.WARNING, "Persistence load error: File vectordata.dat does not exist!");
                s.format(tempLog);
                logFile.publish(tempLog);
            }else{
                java.io.ObjectInputStream iojStream = new java.io.ObjectInputStream(new java.io.FileInputStream(ivFile)); //Ready the reader for readingness...
                PageHolder = (java.util.Vector)iojStream.readObject(); //Pages from file...
                ImgPage = (java.util.Vector)iojStream.readObject(); //images for Pages from file...
                WBStack = (java.util.Vector)iojStream.readObject(); //Current object stack from file...
                objCount = iojStream.readInt(); //Current object count from file...
                pageCount = iojStream.readInt(); //Current number of pages from file...
                pageNum = iojStream.readInt();//iojStream.readInt(); //Current page number from file...
                iojStream.close();}} //Close the file...
            catch(Exception e)// We screwed up somewhere.....
            {SimpleFormatter s = new SimpleFormatter();
             LogRecord tempLog = new LogRecord(Level.WARNING, "Persistence load error: "+e.toString());
             s.format(tempLog);
             e.printStackTrace();
             logFile.publish(tempLog);}
    class fileListener extends Thread {
        public fileListener(WBServer wb) //<-Constructor
            try{ms = new java.net.ServerSocket(1113);} //<- Listener socket
            catch(Exception e){e.toString();}
            server = wb; //<- Referencial variable back to the server
        public fileListener(WBServer wb, int port) //<- Constructor with port
            try{ms = new java.net.ServerSocket(port);} //<- Listener socket
            catch(Exception e){e.toString();}
            server = wb; //<- Referencial variable back to the server
        public void run() {
            String filepath; //<- Holder for file path operations...
            while(!disconnect) {
                try{java.net.Socket cs = ms.accept(); //<- Accept incoming request.
                server.fileStat = 1;
                java.io.BufferedReader str = new java.io.BufferedReader(new java.io.InputStreamReader(cs.getInputStream())); //<- Open communications with client
                String checkStr = str.readLine(); //<- Grab the file name from the client
                System.out.println(checkStr);
                String anchor = getClass().getResource("fileListener.class").getPath();
                if(checkStr.equalsIgnoreCase("vectordata.dat"))
                {filepath=anchor.substring(0, anchor.lastIndexOf('/')+1)+"data/"+checkStr;}
                else{filepath=anchor.substring(0, anchor.lastIndexOf('/')+1)+"scans/"+checkStr;}
                System.out.println(filepath);
                str.close(); //<- Close communications with client
                cs.close(); //<- Close socket
                //System.out.println("Recieved File Name: "+filepath);//Debugging
                java.io.File inFile = new java.io.File(filepath); //<- Make a file in memory on the host computer with the specified name.
                inFile.createNewFile(); //<- Create an empty file of that name within the local file system
                java.net.Socket ds = ms.accept(); //<- Accept incoming request
                java.io.FileOutputStream fos = new java.io.FileOutputStream(inFile); //<- Open file stream for writing...
                java.io.BufferedInputStream bis = new java.io.BufferedInputStream(ds.getInputStream()); //<- Open communications with client for data/
                byte[] fbuffer = new byte[1024]; //<- Byte read buffer
                int read=0; //<- Byte read counter
                server.fileStat = 2;
                while((read=bis.read(fbuffer))!=-1){ //<-Until we reach the end of the stream...
                    fos.write(fbuffer, 0, read); System.out.print(read+":");}// <- ...write the buffer to the file.
                fos.flush(); //<- Clear the file stream
                fos.close(); //<- Close the file stream
                bis.close(); //<- Close the data stream from the client
                if(checkStr.equalsIgnoreCase("vectordata.dat"))
                {server.fileStat = 3; // ...otherwise, we show loading...
                 server.unpackVectors(null);
                 server.sendRefresh(true);
                 server.fileStat=0;}
                else //If it's the sych data, unpack it and load the data
                {server.fileStat = 3; // ...otherwise, we show loading...
                 server.passImage(inFile); //<-Load the file into the image vector...
                 server.sendRefresh(true); //<- Ensure that the client updates properly
                 server.fileStat=0;}
                ds.close(); //<- Close the client socket
                catch(Exception e){e.toString();}
            //System.out.println("Listener Shutdown");//Debugging
            try{ms.close();} catch(Exception e){e.toString();} //<- Close the listening socket
        public boolean disconnect = false; //<- Flag for killing the "file server" prematurely
        private static WBServer server; //<- Referencial variable to the whiteboard server
        private java.net.ServerSocket ms; //<- Listener socket
    }I'm stumped as to where it is going wrong. I know that packVectors() and unpackVectors() both work, as they are used in a local save function. I suspect the problem lies between the getWBContent(String hid) and the fileListener class, but I am not certain where. Any help would be appreciated.

    First, you are expecting read(buffer,offset,count) to throw an EOFException. It doesn't, it returns -1 at EOF.
    Second, you are using a Writer to write binary data (resulting from serialization). This will corrupt it. Use an OutputStream.
    Third, what I really don't get is why would you (i) write local data to a file and (ii) start a new thread to (iii) read it back and (iv) send it over not one but two sockets, when you could just return the data as the result of the remote method without the file, the thread, or the Sockets.
    And in any case this sort of thing is most definitely not what SwingtUtilites.invokeLater() is for. (What it is for is updating Swing components and ensuring it all happens in the Swing thread, being the only correct way to write Swing code as Swing is not thread-safe by design.) If your server has a Swing GUI, which doesn't seem likely, it will stall for the duration of all this I/O. If it doesn't, why start the Swing thread at all?
    Just define a serializable object that contains all the data you are passing to writeObject()/writeInt() and return it as the result of the remote method.
    You will save yourself a lot of latency and code in the process, and you could reduce all this to about six lines of code, something like:
    return new WBContent(
    PageHolder, //Pages to file...
    ImgPage, //Images for the Pages to file...
    WBStack, //Current object stack to file...
    objCount, //Current object count to file...
    pageCount, //Current page count to file...
    pageCount-1 //Current page number to file...
    ); where WBContent is a serializable class with the appropriate members and constructor, and is the return type of getWBContent().

  • Java.io.NotSerializableException - while retriving "one to many" objects

    i am getting java.rmi.MarshalException java.io.NotSerializableException
    while i try to retrive one to many objects
    i have recently migrated from kodo 2.5.x to kodo 3.0.1, and i have parent
    object reference in child objects (reverse mapping reference according to
    kodo 2.5.x) as shown below
    public class BankStatementEntry implements BankStatement {
    private Set accountSummary = new HashSet();
    public interface BankStatement extends Serializable {
    * Returns the accountSummary.
    * @return Map
    public Set getAccountSummary();
    * Returns the accountSummary.
    * @return Map
    public void setAccountSummary(Set accountSummary);
    public class AccountSummaryRecord implements AccountSummary {
    private BankStatementEntry bankStatementEntry;
    public interface AccountSummary extends Serializable {
         * Returns the transactionDetails.
         * @return Collection
         public Set getTransactionDetails();
    the problem is, when i try to retrive BankStatementEntry object, i have to
    iterate through each child (AccountSummaryRecord) object and manualy
    remove parent object reference (BankStatementEntry) by setting null.
    Otherwise EJB throws java.io.NotSerializableException
    Is this bug ?
    Thanks
    karup.

    Thread [Servlet.Engine.Transports : 1] (Suspended)
         java.io.NotSerializableException.<init>() line: 50 [local variables
    unavailable]
         com.ibm.CORBA.iiop.UtilDelegateImpl.copyObjectByProxy(java.lang.Object,
    org.omg.CORBA.ORB, java.lang.ClassLoader, java.lang.Class,
    org.omg.CORBA.portable.Streamable) line: 1316 [local variables unavailable]
         com.ibm.ws.orb.WSUtilDelegateImpl(com.ibm.CORBA.iiop.UtilDelegateImpl).copyObject(java.lang.Object,
    org.omg.CORBA.ORB) line: 771 [local variables unavailable]
         javax.rmi.CORBA.Util.copyObject(java.lang.Object, org.omg.CORBA.ORB)
    line: 327 [local variables unavailable]
         au.com.aig.aiaa.paymentdishonor.process.ejb._BankStatementProcessor_Stub.fetchBankStatement(java.util.Date,
    java.util.Date) line: 366
         au.com.aig.aiaa.business.process.ejb.CommonFacadeBean.fetchBankStatement(java.util.Date,
    java.util.Date) line: 102
         au.com.aig.aiaa.business.process.ejb.EJSRemoteStatelessCommonFacade_aa40cc36.fetchBankStatement(java.util.Date,
    java.util.Date) line: 61
         au.com.aig.aiaa.business.process.ejb._CommonFacade_Stub.fetchBankStatement(java.util.Date,
    java.util.Date) line: 266
         au.com.aig.aiaa.paymentdishonor.web.ReportsAction.execute(org.apache.struts.action.ActionMapping,
    org.apache.struts.action.ActionForm,
    javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 67
         org.apache.struts.action.RequestProcessor.processActionPerform(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse, org.apache.struts.action.Action,
    org.apache.struts.action.ActionForm,
    org.apache.struts.action.ActionMapping) line: 446
         org.apache.struts.action.RequestProcessor.process(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 266
         org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 1292
         org.apache.struts.action.ActionServlet.doGet(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 492
         org.apache.struts.action.ActionServlet(javax.servlet.http.HttpServlet).service(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 740
         org.apache.struts.action.ActionServlet(javax.servlet.http.HttpServlet).service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse) line: 853
         com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse) line: 110 [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet)._service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse) line: 174 [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.IdleServletState.service(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet,
    javax.servlet.ServletRequest, javax.servlet.ServletResponse) line: 313
    [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.StrictServletInstance(com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet).service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse) line: 116 [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.ServletInstance.service(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse,
    com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 258
    [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(com.ibm.ws.webcontainer.servlet.ServletInstanceReference,
    javax.servlet.ServletRequest, javax.servlet.ServletResponse,
    com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 42
    [local variables unavailable]
         com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse,
    com.ibm.ws.webcontainer.webapp.WebAppServletInvocationEvent) line: 40
    [local variables unavailable]
         com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(com.ibm.ws.webcontainer.webapp.WebAppRequest,
    javax.servlet.http.HttpServletResponse) line: 872 [local variables
    unavailable]
         com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse, boolean) line: 491 [local variables
    unavailable]
         com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(javax.servlet.ServletRequest,
    javax.servlet.ServletResponse) line: 173 [local variables unavailable]
         com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(javax.servlet.http.HttpServletRequest,
    javax.servlet.http.HttpServletResponse) line: 79 [local variables
    unavailable]
         com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(java.lang.Object)
    line: 199 [local variables unavailable]
         com.ibm.ws.webcontainer.srt.WebAppInvoker(com.ibm.ws.webcontainer.cache.invocation.CachedInvocation).handleInvocation(java.lang.Object)
    line: 71 [local variables unavailable]
         com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(java.lang.Object)
    line: 114 [local variables unavailable]
         com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(java.lang.String,
    com.ibm.ws.webcontainer.srp.ISRPConnection) line: 187 [local variables
    unavailable]
         com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(com.ibm.ws.webcontainer.oselistener.api.IOSEConnection)
    line: 331 [local variables unavailable]
         com.ibm.ws.webcontainer.http.HttpConnection.handleRequest() line: 56
    [local variables unavailable]
         com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).readAndHandleRequest()
    line: 432 [local variables unavailable]
         com.ibm.ws.webcontainer.http.HttpConnection(com.ibm.ws.http.HttpConnection).run()
    line: 343 [local variables unavailable]
         com.ibm.ws.util.ThreadPool$Worker.run() line: 592 [local variables
    unavailable]

  • Proc_getObject with nolock causes "read operation on a large object failed while sending data to the client"

    SharePoint 2013 code for the SharePoint Config database stored procedure dbo.proc_getObject has been changed from SharePoint 2010 with the difference of select with nolock.
    I am seeing numerous Error 7886, Severity-20 errors nightly:
    "A read operation on a large object failed while sending data to the client. A common cause for this is if the application is running in READ UNCOMMITTED isolation level. This connection will be terminated."
    Here I have commented out "with (nolock)" to 'fix' the error and to align the store proc with SharePoint 2010 code : 
    ALTER PROCEDURE [dbo].[proc_getObject]
    @Id uniqueidentifier,
    @RequestGuid uniqueidentifier = NULL OUTPUT
    AS
    SET NOCOUNT ON
    SELECT
    Id,
    ParentId,
    ClassId,
    Name,
    Status,
    Version,
    Properties
    FROM
    Objects --with (nolock)
    WHERE
    Id = @Id
    RETURN 0
    How is this stored procedure called and for what use?
    Why did Microsoft make this change to SharePoint 2013 - some performance gain through dirty reads at the cost of stability? Or what could be a reason for this to happen that can be fixed?

    GetObject retrieves any farm object that is selected (by ID). Changing this is obviously not supported, and NoLock was used to (help) prevent locks when performing a select query.
    I've never seen this issue, and would guess it is unique to your environment given this is such a core piece of the SharePoint infrastructure.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Java.util.Calendar returning wrong Date object

    Example: This was my scenario last night. A server in California has date/time of 'Mon Aug 18'. Current time in Indiana is 'Sun Aug 17'. I use Calendar.getInstance(TimeZone.getTimeZone("America/Indiana/Indianapolis")) to return a Calendar instance. I then call the getTime() method on that instance. It should return a Date object relating to that particular time zone. It will not. It defaults back to the server time. When I print out the Calendar instance everything is good, correct date, correct time,etc. WHY WON'T THE getTime() return the correct java.util.Date???
    Following is the output was run today so the dates happened to be the same so focus on the Time. Output includes Server time, new Calendar values, and the Date returned by calendar instance getTime(). See that the Calendar is getting the correct Time.
    SERVER DATE=Mon Aug 18 15:52:13 CEST 2003
    CALENDAR INSTANCE=java.util.GregorianCalendar[time=1061214732975,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Indiana/Indianapolis",offset=-18000000,dstSavings=0,useDaylight=false,transitions=35,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=1,ERA=1,YEAR=2003,MONTH=7,WEEK_OF_YEAR=34,WEEK_OF_MONTH=4,DAY_OF_MONTH=18,DAY_OF_YEAR=230,DAY_OF_WEEK=2,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=8,HOUR_OF_DAY=8,MINUTE=52,SECOND=12,MILLISECOND=975,ZONE_OFFSET=-18000000,DST_OFFSET=0]
    Date from getTime()=Mon Aug 18 15:52:12 CEST 2003

    I got it worked with using DateFormat.parse !
    The trick is to instantiate a new Date object as a result
    of parsing out of 'localized' date string.
    with below code :
    Calendar localCal = new GregorianCalendar(TimeZone.getTimeZone("America/Los_Angeles"));
    localCal.set(Calendar.DATE, 25);
    localCal.set(Calendar.MONTH, 7);
    localCal.set(Calendar.YEAR, 2003);
    localCal.set(Calendar.HOUR_OF_DAY,6);
    localCal.set(Calendar.MINUTE, 38);
    localCal.set(Calendar.SECOND, 11);
    Calendar sinCal = new GregorianCalendar(TimeZone.getTimeZone("Asia/Singapore"));
    sinCal.setTimeInMillis(localCal.getTimeInMillis());
    int date = sinCal.get(Calendar.DATE);
    int month = sinCal.get(Calendar.MONTH);
    int year = sinCal.get(Calendar.YEAR);
    int hour = sinCal.get(Calendar.HOUR_OF_DAY);
    int min = sinCal.get(Calendar.MINUTE);
    int sec = sinCal.get(Calendar.SECOND);
    String sinTimeString = date + "/" + month + "/" + year + " " + hour + ":" + min + ":" + sec;
    System.out.println("VIDSUtil.hostToLocalTime : time string now in SIN time : " + sinTimeString);
    java.util.Date sinTime = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").parse(sinTimeString);
    System.out.println("time in SIN using Date.toString(): " + sinTime.toString());
    It prints out :
    VIDSUtil.hostToLocalTime : time string now in SIN time : 25/7/2003 21:38:11
    time in SIN using Date.toString(): Fri Jul 25 21:38:11 PDT 2003
    (Ignore the PDT, because Date.toString() defaults where the JVM is running)

  • Serialization error while returning Value Object from Web Service

    Hi
    I have developed a sample Web Service (RPC based), it returns Customer Value Object
    when client calls getCustomer method.
    I have written a Client (attached the client source code) to invoke the web service
    when the client invokes the Web Service it throws an Exception , the Exception
    Exception in thread "main" serialization error: no serializer is registered for
    (null, {java:customer}Customer)
    at com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer(DynamicInternalTypeMappingRegistry.java:62)
    at com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPResponseSerializer.java:72)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(ReferenceableSerializerImpl.java:47)
    at com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCall.java:382)
    at com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.java:364)
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
    at ClientwithWSDL.main(ClientwithWSDL.java:63)
    CAUSE:
    no serializer is registered for (null, {java:customer}Customer)
    at com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.java:41)
    at com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(InternalTypeMappingRegistryImpl.java:287)
    at com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer(DynamicInternalTypeMappingRegistry.java:47)
    at com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPResponseSerializer.java:72)
    at com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(ReferenceableSerializerImpl.java:47)
    at com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCall.java:382)
    at com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.java:364)
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
    at ClientwithWSDL.main(ClientwithWSDL.java:63)
    If someone can help me to fix the issue, it will be great.
    Thanks
    Jeyakumar Raman.

    I guess, this is because the RI client is not finding the
    codec to ser/deser your Value Object. You need to register
    the codec in the type mapping registry before you invoke
    the web service method.
    Here is a sample:
    Service service = factory.createService( serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( SOAPStruct.class,
    new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
    new SOAPStructCodec(),
    new SOAPStructCodec() );
    BTW, you can do the same exact thing on the client by using
    WLS impl of JAX-RPC. Is there a reason for using RI on the
    client side?
    regards,
    -manoj
    "Jeyakumar Raman" <[email protected]> wrote in message news:[email protected]...
    Hi Manoj,
    Thanks for your information, Yes, my client is Sun's JAX-RPC based, but the Server
    Implementation is done using Weblogic 7.0. When I invoke the Client without WSDL.
    It works fine without any problem. But when I invoke the webservice using WSDL,
    I am getting this problem.
    Here is my Client Code :
    * This class demonstrates a java client invoking a WebService.
    import java.net.URL;
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    import customer.Customer;
    public class ClientwithWSDL {
    private static String qnameService = "CustomerService";
    private static String qnamePort = "CustomerServicePort";
    private static String BODY_NAMESPACE_VALUE =
    "http://jeyakumar_3957:7001/Customer";
    private static String ENCODING_STYLE_PROPERTY =
    "javax.xml.rpc.encodingstyle.namespace.uri";
    private static String NS_XSD =
    "http://www.w3.org/2001/XMLSchema";
    private static String URI_ENCODING =
    "http://schemas.xmlsoap.org/soap/encoding/";
    private static String method="getCustomer";
    private static String endpoint="http://jeyakumar_3957:7001/webservice/CustomerService?WSDL";
    public static void main(String[] args) throws Exception {
    // create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    // define qnames
    QName serviceName =new QName(BODY_NAMESPACE_VALUE, qnameService);
    QName portName = new QName(BODY_NAMESPACE_VALUE, qnamePort);
    QName operationName = new QName("",method);
    URL wsdlLocation = new URL(endpoint);
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call
    Call call = service.createCall(portName, operationName);
    // invoke the remote web service
    Customer result = (Customer) call.invoke(new Object[0]);
    System.out.println("\n");
    System.out.println(result);
    "manoj cheenath" <[email protected]> wrote:
    >
    >
    >Hi Jayakumar,
    >
    >From the stack trace it looks like you are using sun's
    >RI of JAX-RPC. I am not sure what is going wrong with RI.
    >
    >WLS 7.0 got its own implementation of JAX-RPC. Check
    >out the link below for details:
    >
    >http://edocs.bea.com/wls/docs70/webserv/index.html
    >
    >
    >Let us know if you need more details.
    >
    >--=20
    >
    >regards,
    >-manoj
    >
    >
    >
    > "Jeyakumar" <[email protected]> wrote in message =
    >news:[email protected]...
    >
    > Hi
    >
    > I have developed a sample Web Service (RPC based), it returns Customer
    >=
    >Value Object
    > when client calls getCustomer method.
    >
    > I have written a Client (attached the client source code) to invoke
    >=
    >the web service
    > when the client invokes the Web Service it throws an Exception , the
    >=
    >Exception
    >
    >
    > Exception in thread "main" serialization error: no serializer is =
    >registered for
    > (null, {java:customer}Customer)
    > at =
    >com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer=
    >(DynamicInternalTypeMappingRegistry.java:62)
    >
    > at =
    >com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPRespo=
    >nseSerializer.java:72)
    > at =
    >com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(Reference=
    >ableSerializerImpl.java:47)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCal=
    >l.java:382)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.ja=
    >va:364)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
    > at ClientwithWSDL.main(ClientwithWSDL.java:63)
    >
    > CAUSE:
    >
    > no serializer is registered for (null, {java:customer}Customer)
    > at =
    >com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.ja=
    >va:41)
    > at =
    >com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(In=
    >ternalTypeMappingRegistryImpl.java:287)
    > at =
    >com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer=
    >(DynamicInternalTypeMappingRegistry.java:47)
    >
    > at =
    >com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPRespo=
    >nseSerializer.java:72)
    > at =
    >com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(Reference=
    >ableSerializerImpl.java:47)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCal=
    >l.java:382)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.ja=
    >va:364)
    > at =
    >com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)
    > at ClientwithWSDL.main(ClientwithWSDL.java:63)
    >
    > If someone can help me to fix the issue, it will be great.
    >
    > Thanks
    > Jeyakumar Raman.
    >
    >
    ><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    ><HTML><HEAD>
    ><META http-equiv=3DContent-Type content=3D"text/html; =
    >charset=3Diso-8859-1">
    ><META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR>
    ><STYLE></STYLE>
    ></HEAD>
    ><BODY bgColor=3D#ffffff>
    ><DIV><FONT face=3DCourier size=3D2>Hi Jayakumar,</FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
    ><DIV><FONT face=3DCourier size=3D2>From the stack trace it looks like
    >=
    >you are using=20
    >sun's</FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2>RI of JAX-RPC. I am not sure
    >=
    >what is going=20
    >wrong with RI.</FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
    ><DIV><FONT face=3DCourier size=3D2>WLS 7.0 got its own implementation
    >of =
    >
    ></FONT><FONT face=3DCourier size=3D2>JAX-RPC. Check</FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2>out the link below for =
    >details:</FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2></FONT><FONT face=3DCourier=20
    >size=3D2></FONT> </DIV>
    ><DIV><FONT face=3DCourier size=3D2><A=20
    >href=3D"http://edocs.bea.com/wls/docs70/webserv/index.html">http://edocs.=
    >bea.com/wls/docs70/webserv/index.html</A></FONT></DIV>
    ><DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
    ><DIV><FONT face=3DCourier size=3D2></FONT> </DIV>
    ><DIV><FONT face=3DCourier size=3D2>Let us know if you need more=20
    >details.</FONT></DIV>
    ><DIV><BR>-- <BR><BR>regards,<BR>-manoj</DIV>
    ><DIV> </DIV>
    ><DIV><BR> </DIV>
    ><BLOCKQUOTE=20
    >style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
    >BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    > <DIV>"Jeyakumar" <<A=20
    > href=3D"mailto:[email protected]">[email protected]</A>>
    >=
    >wrote in=20
    > message <A=20
    > =
    >href=3D"news:[email protected]">news:[email protected]=
    >a.com</A>...</DIV><BR>Hi<BR><BR>I=20
    > have developed a sample Web Service (RPC based), it returns Customer
    >=
    >Value=20
    > Object<BR>when client calls getCustomer method.<BR><BR>I have written
    >=
    >a Client=20
    > (attached the client source code) to invoke the web service<BR>when
    >=
    >the client=20
    > invokes the Web Service it throws an Exception , the=20
    > Exception<BR><BR><BR>Exception in thread "main" serialization error:
    >=
    >no=20
    > serializer is registered for<BR>(null,=20
    > {java:customer}Customer)<BR>
    >=
    >at=20
    > =
    >com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer=
    >(DynamicInternalTypeMappingRegistry.java:62)<BR><BR> &nb=
    >sp; =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPRespo=
    >nseSerializer.java:72)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(Reference=
    >ableSerializerImpl.java:47)<BR> =
    >=20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCal=
    >l.java:382)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.ja=
    >va:364)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)<BR> =
    > =20
    > at ClientwithWSDL.main(ClientwithWSDL.java:63)<BR><BR>CAUSE:<BR><BR>no
    >=
    >
    > serializer is registered for (null,=20
    > {java:customer}Customer)<BR>
    >=
    >at=20
    > =
    >com.sun.xml.rpc.encoding.TypeMappingUtil.getSerializer(TypeMappingUtil.ja=
    >va:41)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.InternalTypeMappingRegistryImpl.getSerializer(In=
    >ternalTypeMappingRegistryImpl.java:287)<BR> =
    > =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.DynamicInternalTypeMappingRegistry.getSerializer=
    >(DynamicInternalTypeMappingRegistry.java:47)<BR><BR> &nb=
    >sp; =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.soap.SOAPResponseSerializer.initialize(SOAPRespo=
    >nseSerializer.java:72)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.encoding.ReferenceableSerializerImpl.initialize(Reference=
    >ableSerializerImpl.java:47)<BR> =
    >=20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.createRpcResponseSerializer(BasicCal=
    >l.java:382)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.getResponseDeserializer(BasicCall.ja=
    >va:364)<BR> =20
    > at=20
    > =
    >com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:259)<BR> =
    > =20
    > at ClientwithWSDL.main(ClientwithWSDL.java:63)<BR><BR>If someone can
    >=
    >help me=20
    > to fix the issue, it will be great.<BR><BR>Thanks<BR>Jeyakumar=20
    >Raman.</BLOCKQUOTE></BODY></HTML>
    >
    >
    [att1.html]

  • Problem in Web service while return ICollection object

    I developed a webservice, that need to be return a ICollection object.
    while am doing this it showing an error that.
    <b>You must implement a default accessor on System.Collections.ICollection because it inherits from ICollection.</b>
    can u help me in this context
    my code is like
    ICollection iCollectionObj;
    [WebMethod]
    public ICollection GetResourceTypes()
    DirSearchBO dirObj = new DirSearchBO();
    iCollectionObj = dirObj.GetResouceTypes() as ICollection;
    return iCollectionObj;
    above code dirObj.GetResouceTypes() method return a collection that i explicitly converting to ICollection object and retuning....

    Is your patching is still in progrees?If you are patching for basis components then you can expect dumps and they will not allow you to login to the system sometimes .In this case we can perform import from os level to get rid of the issue.
    If your patching is in progress then I would prefer you to wait till it completes.And if this is happening after patching I request you to post log file entries.
    Srikanth.

  • Can FF win return mouse coordinates while over a .swf object

    Hi there,
    I have a flash object embedded in a page and need to get
    coordinates returned from javascript to the flash object. I can get
    this to happen in IE, Safari, and FF Mac even Camino. FF windows
    will not return coordinates when the mouse is over the flash
    object. Is there a way to do this? I'd really appreciate any info.
    Thanks.
    Is this a firefox issue or the way the flash player is
    implemented into firefox windows?
    Here is a link for clarity:
    http://client.karo.com/bcdev/
    Thanks,
    Beau

    sorry for not using the code tags..just learn about it...thanx
    my problem is.when i want to record every coordinates of the mouse while it moves..but using the printstream,it only records the end point of the mouse and not while the mouse moves/dragged.I'm developing a sketch pad program. the program needs to capture the coordinates and saved it into a file.i tried using it but keeps on saving the last point but not all
    example
    point A..........................point N............................point Z
    i want the program to save the coordinate of point A,point B,C,D...point N....and last point Z
    but it keeps on saving only point Z.can u help or give any ideas..thanx

Maybe you are looking for

  • Slow macbook 13" aluminum late 2008

    I use MacKeeper frequently and it seems to make a difference, but not a big one. Just ran Etrecheck for the first time and got this report, but I don't know how to interpret it. For example, what does this mean?:   Startup items are obsolete in OS X

  • Can you run your iTunes folder on a network / wifi drive?

    I currently have a Macbook Pro but intend to get either a Macbook air (with the SSD,) or possibly the netbook / tablet Apple are probably releasing in Q3 this year. My only problem is that both have (or are likely to have,) a smaller hard drive than

  • OSB transformation error- BEA-382513- Error parsing XML

    Hi Gurus - I am struggling to fix one OSB Xquery transformation error <con:errorCode>BEA-382513</con:errorCode> <con:reason>OSB Replace action failed updating variable "body": Error parsing XML: {err}FORG0005: expected exactly one item, got 0 items I

  • Part number for DV2535EA palm rest panel

    I'm trying confirm the part number for palm rest top panel for a DV2535EA (p/n GJ032EA#ABU )Anyone help on this !many thanks ...

  • Multiple CatalogURL's for Software Updates

    I am using Workgroup Manager to set the CatalogURL for software updates.  Can I set multiple url's for software updates so if one address is not reachable the client will look for the next URL?