Getting the REmoteExceptionjava.rmi.MarshalException

Hi
I am unable to get the results while accessing the web service,
it is giving the error
REmoteExceptionjava.rmi.MarshalException: (1)Missing end tag for Body or Envelope
the error is occuring at
try {
resultObj = op.invoke(name);
} catch (JAXRPCException e) {
System.out.println("Error Here at Invoke");
Throwable cause = e.getLinkedCause();
if (cause instanceof java.rmi.RemoteException) {
throw (java.rmi.RemoteException) cause;
any body plz give sol for this problem

oh, and here's some code and errors if that might help:
This is the complete exception:
Running with storage root DefaultColorPhone
java.rmi.MarshalException: (1)Missing end tag for Body or Envelope
     at com.stubs.TrivialService_Stub.purchase(+75)
     at com.apps.TestClient.startApp(+47)
     at javax.microedition.midlet.MIDletProxy.startApp(+7)
     at com.sun.midp.midlet.Scheduler.schedule(+270)
     at com.sun.midp.main.Main.runLocalClass(+28)
     at com.sun.midp.main.Main.main(+116)
Execution completed.This is the stubs for the service:
// This class was generated by 172 StubGenerator.
// Contents subject to change without notice.
// @generated
package com.stubs;
import javax.xml.rpc.JAXRPCException;
import javax.xml.namespace.QName;
import javax.microedition.xml.rpc.Operation;
import javax.microedition.xml.rpc.Type;
import javax.microedition.xml.rpc.ComplexType;
import javax.microedition.xml.rpc.Element;
public class TrivialService_Stub implements com.stubs.TrivialService, javax.xml.rpc.Stub {
     private String[] _propertyNames;
     private Object[] _propertyValues;
     public TrivialService_Stub() {
          _propertyNames = new String[] {ENDPOINT_ADDRESS_PROPERTY};
          _propertyValues = new Object[] {"http://10.0.102.112:8080/warme"};
     public void _setProperty(String name, Object value) {
          int size = _propertyNames.length;
          for (int i = 0; i < size; ++i) {
               if (_propertyNames.equals(name)) {
                    _propertyValues[i] = value;
                    return;
          // Need to expand our array for a new property
          String[] newPropNames = new String[size + 1];
          System.arraycopy(_propertyNames, 0, newPropNames, 0, size);
          _propertyNames = newPropNames;
          Object[] newPropValues = new Object[size + 1];
          System.arraycopy(_propertyValues, 0, newPropValues, 0, size);
          _propertyValues = newPropValues;
          _propertyNames[size] = name;
          _propertyValues[size] = value;
     public Object _getProperty(String name) {
          for (int i = 0; i < _propertyNames.length; ++i) {
               if (_propertyNames[i].equals(name)) {
                    return _propertyValues[i];
          if (ENDPOINT_ADDRESS_PROPERTY.equals(name) || USERNAME_PROPERTY.equals(name) || PASSWORD_PROPERTY.equals(name)) {
               return null;
          if (SESSION_MAINTAIN_PROPERTY.equals(name)) {
               return new java.lang.Boolean(false);
          throw new JAXRPCException("Stub does not recognize property: "+name);
     protected void _prepOperation(Operation op) {
          for (int i = 0; i < _propertyNames.length; ++i) {
               op.setProperty(_propertyNames[i], _propertyValues[i].toString());
     // Begin user methods
     public java.lang.String purchase(java.lang.String string_1, java.lang.String string_2) throws java.rmi.RemoteException {
          // Copy the incoming values into an Object array if needed.
          Object[] inputObject = new Object[2];
          inputObject[0] = string_1;
          inputObject[1] = string_2;
          Operation op = Operation.newInstance(_qname_wrapped_purchase, typepurchase, typepurchaseResponse);
          _prepOperation(op);
          op.setProperty(Operation.SOAPACTION_URI_PROPERTY, "");
          Object resultObj;
          try {
               resultObj = op.invoke(inputObject);
          } catch (JAXRPCException e) {
               Throwable cause = e.getLinkedCause();
               if (cause instanceof java.rmi.RemoteException) {
                    System.out.println("this is where it's at!"); // this is the feil!
                    throw (java.rmi.RemoteException) cause;
               throw e;
          java.lang.String result;
          // Convert the result into the right Java type.
          // Unwrapped return value
          Object resultObj2 = ((Object[])resultObj)[0];
          result = (java.lang.String)resultObj2;
          return result;
     // End user methods
     protected static final QName qnameString_1 = new QName("", "String_1");
     protected static final QName qnameString_2 = new QName("", "String_2");
     protected static final QName qnameresult = new QName("", "result");
     protected static final QName qnamewrapped_purchase = new QName("http://org.jboss.ws/samples/docstyle/wrapped", "purchase");
     protected static final QName qnamepurchase = new QName("http://org.jboss.ws/samples/docstyle/wrapped/types", "purchase");
     protected static final QName qnamepurchaseResponse = new QName("http://org.jboss.ws/samples/docstyle/wrapped/types", "purchaseResponse");
     protected static final Element typepurchase;
     protected static final Element typepurchaseResponse;
     static {
          // Create all of the Type's that this stub uses, once.
          Element typeString_1;
          typeString_1 = new Element(_qname_String_1, Type.STRING, 1, 1, true);
          Element typeString_2;
          typeString_2 = new Element(_qname_String_2, Type.STRING, 1, 1, true);
          ComplexType complexTypepurchase;
          complexTypepurchase = new ComplexType();
          complexTypepurchase.elements = new Element[2];
          complexTypepurchase.elements[0] = typeString_1;
          complexTypepurchase.elements[1] = typeString_2;
          typepurchase = new Element(_qname_purchase, complexTypepurchase);
          Element typeresult;
          typeresult = new Element(_qname_result, Type.STRING, 1, 1, true);
          ComplexType complexTypepurchaseResponse;
          complexTypepurchaseResponse = new ComplexType();
          complexTypepurchaseResponse.elements = new Element[1];
          complexTypepurchaseResponse.elements[0] = typeresult;
          typepurchaseResponse = new Element(_qname_purchaseResponse, complexTypepurchaseResponse);
And this is the client:
package com.apps;
import java.rmi.RemoteException;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;
import javax.xml.rpc.Stub;
import com.stubs.TrivialService;
import com.stubs.TrivialService_Stub;
public class TestClient extends MIDlet {
     protected void startApp() throws MIDletStateChangeException {
          Form form = new Form("First test");
          form.append("HEllo Oinkers!");
          Display.getDisplay(this).setCurrent(form);
          TrivialService_Stub stub = new TrivialService_Stub();
          TrivialService ts = (TrivialService)stub;
          stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://10.0.102.112:8080/warme?wsdl");
          try {
               ts.purchase("Person","product");
          } catch (RemoteException e) {
               e.printStackTrace();
     protected void pauseApp() {
          // TODO Auto-generated method stub
     protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

Similar Messages

  • Java.rmi.MarshalException when getting a Connection from DataSource

    Hi, folks!
    Whenever I try to get a Connection from a DataSource, I´ve got the following Exception:
    "java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
    CORBA MARSHAL 0 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:97)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at weblogic.jdbc.common.internal._RemoteDataSource_Stub.getConnection(Unknown
    Source)
         at com.contratacao.model.dao.DAObasico.getConnection(DAObasico.java:42)..."
    In fact, the client can retrieve the DataSource´s stub, but just can´t get the
    Connection.
    Configuration:
    1. WLS 8.1 sp2, on Windows XP, with SUN JDK 141_05 (embbeded with WLPlatorm installer)
    2. Oracle 9.0.1 on Windows XP, connected through an Oracle JDBC thin driver
    3. java Client on Windows XP/2000, with SUN JDK 142_03 (I´ve got the same results
    with SUN JDK 141_01. I´m also using wlclient.jar.
    Do you have any idea of what is causing this behavior?
    I´d appreciate any help. Thanks in advance,
    Marcos

    "Marcos Medina" <[email protected]> writes:
    This is an FAQ. The RMI JDBC driver is not supported in the thin client.
    andy
    Hi, folks!
    Whenever I try to get a Connection from a DataSource, I´ve got the following Exception:
    "java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
    CORBA MARSHAL 0 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:97)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
         at weblogic.jdbc.common.internal._RemoteDataSource_Stub.getConnection(Unknown
    Source)
         at com.contratacao.model.dao.DAObasico.getConnection(DAObasico.java:42)..."
    In fact, the client can retrieve the DataSource´s stub, but just can´t get the
    Connection.
    Configuration:
    1. WLS 8.1 sp2, on Windows XP, with SUN JDK 141_05 (embbeded with WLPlatorm installer)
    2. Oracle 9.0.1 on Windows XP, connected through an Oracle JDBC thin driver
    3. java Client on Windows XP/2000, with SUN JDK 142_03 (I´ve got the same results
    with SUN JDK 141_01. I´m also using wlclient.jar.
    Do you have any idea of what is causing this behavior?
    I´d appreciate any help. Thanks in advance,
    Marcos

  • Servlet acts as an RMI client to get the current time of day

    my application is servlet acts as an RMI client to get the current time of day from the DaytimeServlet RMI server so iam not getting the correctime....
    import java.io.*;
    import java.rmi.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DaytimeClientServlet extends
    HttpServlet
    DaytimeServer daytime;
    protected DaytimeServer getDaytimeServer() {
    DaytimeServer stub.
    if (System.getSecurityManager() == null) {
    System.setSecurityManager(new
    RMISecurityManager());
    try {
    Registry registry =
    LocateRegistry.getRegistry(getRegistryHost(),
    getRegistryPort());
    return
    (DaytimeServer)registry.lookup(getRegistryName());
    catch (Exception e) {
    getServletContext().log(e, "Problem getting
    DaytimeServer reference");
    return null;
    private String getRegistryName() {
    String name = getInitParameter("registryName");
    return (name == null ? "DaytimeServlet" : name);
    private String getRegistryHost() {
    return getInitParameter("registryHost");
    private int getRegistryPort() {
    try { return
    Integer.parseInt(getInitParameter("registryPort");
    catch (NumberFormatException e) { return
    Registry.REGISTRY_PORT; }
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws
    ServletException, IOException {
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    if (daytime == null) {
    daytime = getDaytimeserver();
    if (daytime == null) {
    throw new UnavailableException(this, "Could
    not locate daytime");
    out.println(daytime.getDate().toString());
    please help me out

    Hi lucentb,
    what i observed from your code is some simple coding faults are there.. so i am giving you some test code..
    i hope this will help you out.
    import java.io.*;
    import java.rmi.*;
    import java.rmi.registry.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DaytimeClientServlet extends HttpServlet
    DaytimeServer daytime;
    protected DaytimeServer getDaytimeServer()
    if (System.getSecurityManager() == null)
    System.setSecurityManager(new RMISecurityManager());
    try {
    Registry registry = LocateRegistry.getRegistry(getRegistryHost(),
    getRegistryPort());
    return
    (DaytimeServer)registry.lookup(getRegistryName());
    catch (Exception e) {
    getServletContext().log(e, "Problem getting DaytimeServer reference");
    return null;
    private String getRegistryName()
    String name = getInitParameter("registryName");
    return (name == null ? "DaytimeServlet" : name);
    private String getRegistryHost() {
    return getInitParameter("registryHost");
    private int getRegistryPort()
    try
    return
    Integer.parseInt(getInitParameter("registryPort")); }
    catch (NumberFormatException e)
    return
    Registry.REGISTRY_PORT;
    public void doGet(HttpServletRequest req,
    HttpServletResponse res)
    throws
    ServletException, IOException {
    res.setContentType("text/plain");
    PrintWriter out = res.getWriter();
    if (daytime == null) {
    daytime = getDaytimeServer();
    if (daytime == null) {
    // Couldn't get it, so report we're
    unavailable.
    throw new UnavailableException(this, "Could
    not locate daytime");
    out.println(daytime.getDate().toString());
    If you have any problem after this please send me the exceptions and problem situations with deatils codes..
    Regards,
    TirumalaRao
    Developer Technical Support,
    Sun Microsystems, India.

  • WS - "java.rmi.MarshalException: (1)Missing end tag for Body or Envelope"

    HI All,
    I'm new of this forum but I really hope you could help me solving the problem I have to connect Web Services and midlets.
    Somehow my configuration works with some services I've found online but when I invoke very simple services deployed on my server(s) I always have "java.rmi.MarshalException: (1)Missing end tag for Body or Envelope" exception"
    Let me add some more information to the problem:
    System Configuration:
    - JBoss (but I also tried axis) - standard installation (http/1.1)
    - WTK 2.5 (but I also tried 2.2) - standard installation
    - I tried "trusted" and "untrusted" security configuration of the servlet
    - Netbeans IDE 5.0 (to create both Midlets and WS)
    - WS uses document/literal as expected by JSR 172
    The midlet is created with no problems but at the time of invocation the server throws the above exception (which is part of rmi. remoteException)
    By monitoring the network both at client and server side I noticed that the information received is chuncked after 768 bytes. However, If the (soap) reponse is less than such value, I still have the error.
    Using Http/1.1. at the mobile side, the service does not return me anything (0kb) while if I set the mobile device to http/1.0, I get the above error.
    I really have to make the midlet running so any type of help will be really appreciated!!
    Thanks in advance

    Hi all,
    as many developers I have encountered the famous "java.rmi.MarshallException:(1)Missing end tag for Body or Envelope" during the development of my WS app for J2ME (JSR 172).
    It is correct that is the empty tag <soapenv:Header /> causing this error.
    To fix this error, it is necessary to stop the server to generate this empty header in the response stream.
    I have fixed this error for Axis2: unfortunaly it is necessary to modify a class in Axiom library. This library is used in Axis2 to produce the SOAP response, you can download the source code at http://ws.apache.org/commons/axiom/source-repository.html.
    Here the class to modify:
    axiom\modules\axiom-impl\src\main\java\org\apache\axiom\soap\impl\llom\soap11\SOAP11Factory.java
    by commenting the line 273 in the method called getDefaultEnvelope() to prevent the empty header insertion in SOAP response:
    public SOAPEnvelope getDefaultEnvelope() throws SOAPProcessingException {
            OMNamespace ns =
                    new OMNamespaceImpl(
                            SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
                            SOAP11Constants.SOAP_DEFAULT_NAMESPACE_PREFIX);
            SOAPEnvelopeImpl env = new SOAPEnvelopeImpl(ns, this);
            //createSOAPHeader(env); the line to be commented
            createSOAPBody(env);
            return env;
        }Finally you have to recompile Axiom using Maven to obtain the fixed package axiom-impl.jar and to replace this package on the lib repository of your Axis2 server.
    A little tricky to fix this bug but now my app runs perfectly ;)
    Enjoy!
    Romain Pellerin
    http://www.gasp-mobilegaming.org

  • Java.rmi.MarshalException: CORBA COMM_FAILURE 1398079691

    I am facing a problem in Weblogic 8.1 with service pack 4. I have deployed an EJB that parses an xml and transforms that to an another xml. If we send an xml with less data...say for example, the file size is around 5KB, then it works fine. If we send a larger xml that is of size more than 10KB, then I get the following exception.
    com.boomboat.scs.services.client.ClientException: CORBA COMM_FAILURE 1398079691 No; nested exception is:
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
         at com.boomboat.scs.services.client.SCSClient.getCsoFromLso(SCSClient.java:157)
         at ORTester.main(ORTester.java:109)
    Caused by: java.rmi.MarshalException: CORBA COMM_FAILURE 1398079691 No; nested exception is:
         org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
         at com.sun.corba.se.internal.iiop.ShutdownUtilDelegate.mapSystemException(Unknown Source)
         at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
         at com.boomboat.scs.services.legacytransformation.ejb._TransformerRemote_Stub.getCsoFromLso(Unknown Source)
         at com.boomboat.scs.services.client.SCSClient.getCsoFromLso(SCSClient.java:155)
         ... 1 more
    Caused by: org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
         at com.sun.corba.se.internal.iiop.IIOPConnection.sendWithoutLock(Unknown Source)
         at com.sun.corba.se.internal.iiop.BufferManagerWriteGrow.sendMessage(Unknown Source)
         at com.sun.corba.se.internal.iiop.IIOPOutputStream.finishSendingMessage(Unknown Source)
         at com.sun.corba.se.internal.iiop.IIOPOutputStream.invoke(Unknown Source)
         at com.sun.corba.se.internal.iiop.ClientRequestImpl.invoke(Unknown Source)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(Unknown Source)
         at com.sun.corba.se.internal.corba.ClientDelegate.invoke(Unknown Source)
         at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
         ... 3 more
    Do anybody have any idea on how to resolve this?

    There is no firewall settings between the client and server sides. I checked the JDK ORB on the server, it run well at the moment of MarshaoException. Normally, we will have the MarshalException when the stub class in the client side is not up to date...any other possible reasons?
    May I have some suggestions? Or my statement is not clear enough?
    Thanks

  • Java.rmi.MarshalException (Stub is there)

    Hi I'm gettin the following errors:
    Exception in thread "main" java.rmi.MarshalException: error marshalling argument
    s; nested exception is:
    java.io.NotSerializableException: package1.InternalRequest
    Above error when running in dos (i have used rmic to create the stub)
    But in Eclipse editor i get the following error when running:
    Exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: package1.InternalRequest_Stub (no security manager: RMI class loader disabled)
    Any ideas? I've used rmic to create the stub and I've started rmiregistry then started the server again however I still cannot get past this problem. It worked fine before.

    Nope still getting:
    Exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.lang.ClassNotFoundException: package1.InternalRequest_Stub (no security manager: RMI class loader disabled)
    Anyone know why this is happening??
    I have created the stub and I have rmiregistry running.

  • XML InputSource and RMI MarshalException

    Hi all,
    I have a session EJB that creates an XML data structure as an org.xml.sax.InputSource. This object should then be passed on to stylesheet transformation in web container. I am getting the following error because InputSource is not serializable.
    I created a wrapper class and modified the EJB method to send this. The error still pops up. Any ideas would be appreciated. Thanks.
    Wrapper class:
    public class XMLSource {
    private org.xml.InputSource xml;
    public XMLSource(InputSource is) {
    this.xml = is;
    public InputSource getXMLData() {
    return this.xml;
    Exception:
    java.rmi.MarshalException: error marshalling return; nested exception is:
         java.io.NotSerializableException: org.xml.sax.InputSource

    The design was no good with EJB added. Solution was to send String object from EJB and create InputSource in web container via StringReader class.

  • Java.rmi.MarshalException:....Broken pipe (plz help)

    Hi,
    I tried to run one simple RMI application..
    I got the RMI Server running...
    But While running the client I got the following Exception...
    java.rmi.MarshalException: error marshalling arguments; nested exception is:
    java.net.SocketException: Broken pipe
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:129)
    at engine.ServerMain_Stub.addTask(Unknown Source)
    at client.ClientMain.initCompute(ClientMain.java:38)
    at client.ClientMain.main(ClientMain.java:17)
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:105)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1639)
    at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(ObjectOutputStream.java:1548)
    at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1146)
    at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1100)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1241)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052) at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1355)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:281)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:265)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:124)
    ... 3 more
    I am not able to understand the problem...
    Plz help..
    Regerds
    Jijo Vincent

    Hi, I got same stack trace within RMIConnector.
    MBean Server (= RIM Server) has bean alive, but a MBean client may get following Exception.
    I'm guessing that a port on server side was closed, cause rmi object on server side was unbinded from the rmi registory by some trigger.
    But I don't know what was the trigger for this...
    Caused by: java.rmi.MarshalException: error marshalling arguments; nested exception is:
    java.net.SocketException: Broken pipe
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.invoke(RMIConnector.java:993)
    at javax.management.MBeanServerInvocationHandler.invoke(MBeanServerInvocationHandler.java:288)
    ... 7 more
    Caused by: java.net.SocketException: Broken pipe
    at java.net.SocketOutputStream.socketWrite0(Native Method)
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:109)
    at java.io.ObjectOutputStream$BlockDataOutputStream.drain(ObjectOutputStream.java:1847)
    at java.io.ObjectOutputStream$BlockDataOutputStream.writeByte(ObjectOutputStream.java:1885)
    at java.io.ObjectOutputStream.writeFatalException(ObjectOutputStream.java:1546)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:333)
    at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
    ... 11 more
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_24-b07
    java.specification.name = Java Platform API Specification
    java.specification.vendor = Sun Microsystems Inc.
    java.specification.version = 1.6
    os.arch = amd64
    os.name = Linux
    os.version = 2.6.18-194.el5

  • Java.rmi.MarshalException: error marshalling return;

    Hi All,
    I'm getting the above error whilst performing a query. My set up is,
    Kodo 3.1.5
    Weblogic 8.1
    I have created some classes using the reverse mapping from Sybase,
    enhanced them and uploaded them to my server. I have then attempted to
    retrieve the data via an EJB. However I get NotSerializableExceptions
    whilst doing so.
    I am attempting to return a Collection of enhanced objects, but even a
    single enhanced object throws that error
    I think it may be something to do with my package.jdo or something else.
    Can anyone help?
    My package.jdo looks like this,
    <?xml version="1.0" encoding="UTF-8"?>
    <jdo>
    <package name="com.lehman.clientseg.data">
    <class name="AuditRecord" objectid-class="AuditRecordId"/>
    <class name="Btb" objectid-class="BtbId"/>
    <class name="CashActivity" objectid-class="CashActivityId"/>
    <class name="CashBulk" objectid-class="CashBulkId"/>
    <class name="CcyTypeIndicator" objectid-class="CcyTypeIndicatorId">
    <field name="descn">
    <extension vendor-name="kodo" key="jdbc-size" value="-1"/>
    </field>
    </class>
    <class name="Counterparty" objectid-class="CounterpartyId"/>
    <class name="Currency" objectid-class="CurrencyId"/>
    <class name="DealType" objectid-class="DealTypeId"/>
    <class name="DeliveryInstruction"
    objectid-class="DeliveryInstructionId"/>
    <class name="Entity" objectid-class="EntityId"/>
    <class name="MonitoredEvent" objectid-class="MonitoredEventId"/>
    <class name="PaymentType" objectid-class="PaymentTypeId"/>
    <class name="Sequence" objectid-class="SequenceId"/>
    <class name="SettlementMode" objectid-class="SettlementModeId"/>
    </package>
    </jdo>
    and here is the stack trace,
    java.rmi.MarshalException: error marshalling return; nested exception is:
    java.io.NotSerializableException: com.lehman.clientseg.data.Entity
    at
    weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    at
    weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_812_WLStub.getAllEntities(Unknown
    Source)
    at com.lehman.clientseg.BeanTest.<init>(BeanTest.java:49)
    at com.lehman.clientseg.BeanTest.main(BeanTest.java:62)
    Caused by: java.io.NotSerializableException:
    com.lehman.clientseg.data.Entity
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at java.util.LinkedList.writeObject(LinkedList.java:681)
    at sun.reflect.GeneratedMethodAccessor157.invoke(Unknown Source)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:795)
    at
    java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1294)
    at
    java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at
    java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at
    weblogic.common.internal.ChunkedObjectOutputStream.writeObject(ChunkedObjectOutputStream.java:116)
    at
    weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:93)
    at
    com.lehman.clientseg.server.ejb.JDOBean_1a5ozo_EOImpl_WLSkel.invoke(Unknown
    Source)
    at
    weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
    at
    weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
    at
    weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
    at
    weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

    Abe White wrote:
    Looks like you're trying to serialize a class that's not serializable,
    probably by returning it (or a class that has a relation to it) from an EJB.Very strange. My classes where autogenerated using the reverse mapping
    tool and weren't serializable. I'm sure I once did make them serializable
    and I got more error messages. I just tried again and everything was fine.
    Hmmm... Must be going mad.
    Cheers,
    Stevie :)

  • JBoss + java.rmi.MarshalException: Socket timed out

    Hello.
    I'm not author of the software, I've just been transfered to try solve this problem:
    I've got an client application, an server app, JBoss, and Oracle DB.
    Now, when i try to create a big report in xls, which usually takes over 30minutes i get the exception:
    pl.wasko.serloc.DelegateException: Utracono po��czenie z serwerem.
    Spr�buj ponowi� operacj�
         at pl.wasko.mra.template.delegate.DocumentDelegate.unknownException(DocumentDelegate.java:74)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:590)
         at pl.wasko.mra.client.task.ExportTemplateToFileTask.<init>(ExportTemplateToFileTask.java:71)
         at pl.wasko.mra.client.document.DocumentAdministration$11.construct(DocumentAdministration.java:447)
         at pl.wasko.mra.client.task.SwingWorker$2.run(SwingWorker.java:146)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.rmi.MarshalException: Socket timed out.  Waited 1800000 milliseconds for response while calling on InvokerLocator [socket://193.178.240.21:3873/]; nested exception is:
         java.net.SocketTimeoutException: Read timed out
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:302)
         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
         at org.jboss.remoting.Client.invoke(Client.java:525)
         at org.jboss.remoting.Client.invoke(Client.java:488)
         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
         at $Proxy1.exportTemplateToXlsByteArray(Unknown Source)
         at pl.wasko.mra.template.delegate.DocumentDelegate.exportToXls(DocumentDelegate.java:581)
         ... 4 more
    Caused by: java.net.SocketTimeoutException: Read timed out
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
         at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
         at java.io.ObjectInputStream$BlockDataInputStream.peek(ObjectInputStream.java:2490)
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2500)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
         ... 18 moreProblem is that I'm not the author of this program, program is old, and the author learned on it, so it's code is illegible (I mean dificult to debug, and even read).
    I've only discovered that it uses Jasper to generate raport (I think so... I don't know), trace ended here:
    JasperConversion conv = new JasperConversion();                 
          JasperPrint jasperPrint = conv.createJasperPrint(template,params,searchCompileReport,userId, reportPagination);
          String test = System.getProperty("pl.wasko.mra.template.test");
          if(test != null && test.equals("1"))
            String tempDir = System.getProperty("jasper.reports.compile.temp");
            if(tempDir != null)
              conv.exportToPdfFile(jasperPrint,tempDir+"/test.xls");
          }I really don't ahve any ideas, I've tried to edit xml files on jboss - no result, properties files - the same, I was looking for something in the code to change timeout, but without results.
    Please, if anyone had similar problem, or have an idea, how to fix this, I will be very gratefull

    if you are using jboss 4+ and ejb3, ib believe you want to edit the "ejb3.deployer/META-INF/jboss-service.xml" file. you want to change the "InvokerLocator" attribure on the "jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3" mbean. it should currently look like "socket://${jboss.bind.address}:3873". you want to add a "timeout" attribute like "socket://${jboss.bind.address}:3873/?timeout=yourTimeoutHere", where "yourTimeoutHere" is your desired timeout in milliseconds.

  • Java.rmi.MarshalException: CORBA MARSHAL

    I am getting the following exception when server is sending response back to client:
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.octagonresearch.viewpoint.client.proxy.weblogic.ClientProxyEjb.invoke(ClientProxyEjb.java:97)
         ... 13 more
    Caused by: java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
         at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Util.java:197)
         at javax.rmi.CORBA.Util.mapSystemException(Util.java:67)
         at com.octagonresearch.viewpoint.server.biztier.ws._SessionControllerWSRemote_Stub.invoke(Unknown Source)
         ... 18 more
    Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(MessageBase.java:897)
         at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:99)
         at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(CorbaMessageMediatorImpl.java:572)
         at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:432)
         at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:326)
         at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
         at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
    Any idea how to get rid of this problem. Thank you.

    Hi,
    I am not very sure whether it will work but I have read somewhere that this exception occurs if the Remote Object size is more than the Java stack size at the client side which is by default 256 Kb. So. it might be possible that if the Stub size exceeds, then Client is not able to load the Stubs and hence the Marshal Exception is coming.
    I think increasing the Java stack size of the Web\ EJB containers might resolve the issue.

  • Java.rmi.MarshalException: Exception

    hi,
    i am getting the below error while displaying the data from a servlet. Here in servlet i had written the code to store values. And then i had written a function "getDetails()" which will give result set object. At that time i am getting this error. This method code is in bena class.
    In servlet this is the code i had wriiten
    InitialContext initContext=new InitialContext();
                        home=(InsuranceHome)initContext.lookup(ejbJndiName);
                        remote=home.create();
                        int n=remote.insertDetails(cname,frm_date,to_date,type,ppaid,rmks);
                        ResultSet rs=remote.getResults();
                        while(rs.next())
                             System.out.print(rs.getString(1));
                             System.out.print(rs.getString(2));
                             System.out.print(rs.getString(3));
                             System.out.println(rs.getString(4));
                        System.out.println(n);
    [10/Apr/2008:11:34:06] INFO ( 3108): CORE3282: stdout:      java.rmi.MarshalException: Exception occurred in server thread; nested exception is:
    [10/Apr/2008:11:34:06] INFO ( 3108): CORE3282: stdout:      java.io.NotSerializableException

    the NEVER used here, is it an EJB specification issue or design issue. If EJB specification issue then you should be right of which i am not sure. Please quote reference.
    If design issue then NEVER is wrong. Its depends on task to be addressed. Data Transfer Pattern allows the use of Rowset to exchange data between clients and servers.These options are either DTOs, containers, RowSets all are serializabel.How will you managed bandwidth and memory issues in a critical application where by clients needs to get a copy of data store in their memory(delete,update, insert) and after finished with their task they simply click synchronized.
    this copy(rowset) in client is simply sent to sever for updates rather than doing update, insert, delete request to server for every operation.
    This is a pattern design issue and the choice of Data Transfer Object depends on the task and type of communication between clients and server.
    A RowSet in the situation whereby 1. number of request to server has to be reduced, 2. connection to server has to be minimal. 3. each client gets a copy of his data as a snapshot of server contents processed it an then do synchronization when needed(bulk).Also this is issued when memory of client is a big issue like mobiles so installing a DB on the mobile is not possible. The rowset sent to client must not hold a connection to DB.
    Ivo Sumelong

  • Java.rmi.MarshalException : CORBA MARSHAL 1398079699

    I deployed an application with a stateless SessionBean
    in J2EE 1.3.
    When accessed from a non-java client using JNI, I got InvocationTargetException
    "java.rmi.MarshalException : CORBA MARSHAL 398079699 Maybe;
    nested exception is: org.omg.CORBA.MARSHAL: minor code: 1398079699 completed: Maybe"
    Anybody encountered a similar problem ?

    Hi,
    I think i have exactly the same problem as you. I have a client app accessing a stateless session bean .
    The error I get seems to be related to the argument passed to the method i'm calling. In my application I am passing in a "complicated" value object to the session bean. My guess is that the value object is not compliant with the CORBA rules.
    I'm trying to find out what is and isn't legal for Value Objects. the least i know is that the value object must implement Serializable.
    I'll keep you posted If i can sort it out.

  • BEA-000126 java.rmi.MarshalException: failed to marshal

    We are getting the following error in our clustered QA environment. We run Weblogic 10.3.3.0 on linux.
    ####<Mar 29, 2011 3:59:54 PM CDT> <Error> <Cluster> <app2.qa.server.com> <qa_app2j> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <> <1301432394933> <BEA-000126> <All session objects should be serializable to replicate. Check the objects in your session. Failed to replicate non-serializable object.
    java.rmi.MarshalException: failed to marshal update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;Ljava.lang.Object;); nested exception is:
    java.io.NotSerializableException: com.tjf.admin.virtualFair.Job$1
    at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:92)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:221)
    at weblogic.cluster.replication.ReplicationManager_1033_WLStub.update(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor15419.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.cluster.replication.SecureReplicationInvocationHandler$ReplicationServicesInvocationAction.run(SecureReplicationInvocationHandler.java:184)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.cluster.replication.SecureReplicationInvocationHandler.invoke(SecureReplicationInvocationHandler.java:154)
    at $Proxy98.update(Unknown Source)
    at weblogic.cluster.replication.ReplicationManager.updateSecondary(ReplicationManager.java:535)
    at weblogic.servlet.internal.session.ReplicatedSessionData.syncSession(ReplicatedSessionData.java:594)
    at weblogic.servlet.internal.session.ReplicatedSessionContext.sync(ReplicatedSessionContext.java:85)
    at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2810)
    at weblogic.servlet.internal.ServletRequestImpl$SessionHelper.syncSession(ServletRequestImpl.java:2785)
    at weblogic.servlet.internal.ServletResponseImpl$1.run(ServletResponseImpl.java:1480)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1474)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1455)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Here is the java file that is causing this:
    package com.tjf.admin.virtualFair;
    import com.tjf.TargetedJobFairsConstants;
    import com.tjf.util.TargetedJobFairsToolBox;
    import org.apache.log4j.Logger;
    import java.io.Serializable;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.util.Comparator;
    import java.util.TreeMap;
    public class Job implements Serializable {
         protected int id;
         protected String name;
         protected String description;
         protected int companyId;
         protected String hash;
         private static Logger logger = initializeLogger();
         protected static Logger initializeLogger() {
              Logger logger = Logger.getLogger(TargetedJobFairsConstants.TJF_LOG4J_NAME);
              logger.info("logger initialized!");
              return logger;
         public Job(String name, String description, int companyId) {
              this.name = name;
              this.description = description;
              this.companyId = companyId;
         public Job(int id, String name, String description, int companyId) {
              this.id = id;
              this.name = name;
              this.description = description;
              this.companyId = companyId;
         public Job(String name, String description) {
              this.name = name;
              this.description = description;
              this.companyId = companyId;
         public String getHash() {
              if (id != -1 && name != null && !name.equals("")) {
                   return TargetedJobFairsToolBox.createHash(name, "" + id);
              } else {
                   return null;
         public int getCompanyId() {
              return companyId;
         public void setCompanyId(int companyId) {
              this.companyId = companyId;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
         public String getDescription() {
              return description;
         public void setDescription(String description) {
              this.description = description;
         public static boolean validateName(String name, StringBuffer message) {
              if (name != null && !name.trim().equals("")) {
                   // check for duplicated Virtual Fair Company Name
                   return true;
              } else {
                   if (message.length() > 0) {
                        message.append(", Name ");
                   } else {
                        message.append(" Name ");
                   return false;
         public static boolean validateDescription(String description, StringBuffer message) {
              if (description != null && !description.trim().equals("")) {
                   return true;
              } else {
                   if (message.length() > 0) {
                        message.append(", Description ");
                   } else {
                        message.append(" Description ");
                   return false;
         public static boolean validateCompanyIDString(String companyID, StringBuffer message) {
              if (companyID != null && !companyID.trim().equals("")) {
                   return true;
              } else {
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(32) ");
                   } else {
                        message.append(" unknown virtual fair error(32) ");
                   return false;
         protected boolean insertJob(Connection tjfConn, StringBuffer message) {
              PreparedStatement insertJobStmt = null;
              String insertJobSQL = null;
              try {
                   insertJobSQL = "insert into VIRTUAL_FAIR_JOB ( NAME, DESCRIPTION, COMPANY_ID ) " +
                             "values (?, ?, ?) ";
                   insertJobStmt = tjfConn.prepareStatement(insertJobSQL);
                   insertJobStmt.setString(1, this.name);
                   insertJobStmt.setString(2, this.description);
                   insertJobStmt.setInt(3, this.companyId);
                   insertJobStmt.executeUpdate();
                   message.append(" Job \"" + this.name + "\" was successfully created.");
                   return true;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(33) ");
                   } else {
                        message.append(" unknown virtual fair error(33) ");
                   return false;
         protected boolean updateJob(Connection tjfConn, StringBuffer message) {
              PreparedStatement insertJobStmt = null;
              String insertJobSQL = null;
              try {
                   insertJobSQL = "update VIRTUAL_FAIR_JOB set NAME = ?, DESCRIPTION = ? where" +
                             " COMPANY_ID = ? and ID = ?";
                   insertJobStmt = tjfConn.prepareStatement(insertJobSQL);
                   insertJobStmt.setString(1, this.name);
                   insertJobStmt.setString(2, this.description);
                   insertJobStmt.setInt(3, this.companyId);
                   insertJobStmt.setInt(4, this.id);
                   insertJobStmt.executeUpdate();
                   message.append(" Job \"" + this.name + "\" was successfully updated.");
                   return true;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(34) ");
                   } else {
                        message.append(" unknown virtual fair error(34) ");
                   return false;
         public static boolean deleteJobByCompanyID(Connection tjfConn, int companyID, StringBuffer message) {
              PreparedStatement deleteJobStmt = null;
              String deleteJobSQL = null;
              try {
                   deleteJobSQL = "delete from VIRTUAL_FAIR_JOB where " +
                             " COMPANY_ID = ? ";
                   deleteJobStmt = tjfConn.prepareStatement(deleteJobSQL);
                   deleteJobStmt.setInt(1, companyID);
                   deleteJobStmt.executeUpdate();
                   message.append(" Jobs were successfully deleted.");
                   return true;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(35) ");
                   } else {
                        message.append(" unknown virtual fair error(35) ");
                   return false;
         public static boolean deleteJob(Connection tjfConn, int jobID, int companyID, StringBuffer message) {
              PreparedStatement deleteJobStmt = null;
              String deleteJobSQL = null;
              try {
                   deleteJobSQL = "delete from VIRTUAL_FAIR_JOB where " +
                             " COMPANY_ID = ? and ID = ? ";
                   deleteJobStmt = tjfConn.prepareStatement(deleteJobSQL);
                   deleteJobStmt.setInt(1, companyID);
                   deleteJobStmt.setInt(2, jobID);
                   deleteJobStmt.executeUpdate();
                   message.append(" Job was successfully deleted.");
                   return true;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(36) ");
                   } else {
                        message.append(" unknown virtual fair error(36) ");
                   return false;
         public static TreeMap<Job, Integer> getJobListforCompany(Connection tjfConn, int companyID, StringBuffer message) {
              TreeMap<Job, Integer> jobsList = new TreeMap<Job, Integer>(new Comparator() {
                   public int compare(Object job, Object anotherJob) {
                        String name1 = ((Job) job).getName();
                        String name2 = ((Job) anotherJob).getName();
                        return name1.toLowerCase().compareTo(name2.toLowerCase());
              PreparedStatement getJobListStmt = null;
              String getJobListSQL = null;
              ResultSet getJobListRset = null;
              try {
                   getJobListSQL = "select ID, NAME, DESCRIPTION, COMPANY_ID from VIRTUAL_FAIR_JOB where COMPANY_ID = ?";
                   getJobListStmt = tjfConn.prepareStatement(getJobListSQL);
                   getJobListStmt.setInt(1, companyID);
                   getJobListRset = getJobListStmt.executeQuery();
                   while (getJobListRset.next()) {
                        Job holdJob = new Job(getJobListRset.getInt(1),
                                  getJobListRset.getString(2),
                                  getJobListRset.getString(3),
                                  getJobListRset.getInt(4));
                        jobsList.put(holdJob, holdJob.id);
                   return jobsList;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(37) ");
                   } else {
                        message.append(" unknown virtual fair error(37) ");
                   return null;
         public static Job getJobByID(Connection tjfConn, int jobID, StringBuffer message) {
              PreparedStatement getJobListStmt = null;
              String getJobListSQL = null;
              ResultSet getJobListRset = null;
              try {
                   getJobListSQL = "select ID, NAME, DESCRIPTION, COMPANY_ID from VIRTUAL_FAIR_JOB where ID = ?";
                   getJobListStmt = tjfConn.prepareStatement(getJobListSQL);
                   getJobListStmt.setInt(1, jobID);
                   getJobListRset = getJobListStmt.executeQuery();
                   Job holdJob = null;
                   if (getJobListRset.next()) {
                        holdJob = new Job(getJobListRset.getInt(1),
                                  getJobListRset.getString(2),
                                  getJobListRset.getString(3),
                                  getJobListRset.getInt(4));
                   return holdJob;
              } catch (Exception x) {
                   logger.error(x, x);
                   if (message.length() > 0) {
                        message.append(", unknown virtual fair error(38) ");
                   } else {
                        message.append(" unknown virtual fair error(38) ");
                   return null;
    Any suggestions on what might cause this?
    Thanks,
    Tom

    Hi Thenrik,
    This is right but Serialization does not concern about methods. and it is only about Instance variables.
    public static TreeMap<Job, Integer> getJobListforCompany(Connection tjfConn, int companyID, StringBuffer message) {
               TreeMap<Job, Integer> jobsList = new TreeMap<Job, Integer>(new Comparator() {
                    public int compare(Object job, Object anotherJob) {
                         String name1 = ((Job) job).getName();
                         String name2 = ((Job) anotherJob).getName();
                         return name1.toLowerCase().compareTo(name2.toLowerCase());
               PreparedStatement getJobListStmt = null;
               String getJobListSQL = null;
               ResultSet getJobListRset = null;
               try {
                    getJobListSQL = "select ID, NAME, DESCRIPTION, COMPANY_ID from VIRTUAL_FAIR_JOB where COMPANY_ID = ?";
                    getJobListStmt = tjfConn.prepareStatement(getJobListSQL);
                    getJobListStmt.setInt(1, companyID);
                    getJobListRset = getJobListStmt.executeQuery();
                    while (getJobListRset.next()) {
                         Job holdJob = new Job(getJobListRset.getInt(1),
                                   getJobListRset.getString(2),
                                   getJobListRset.getString(3),
                                   getJobListRset.getInt(4));
                         jobsList.put(holdJob, holdJob.id);
                    return jobsList;
               } catch (Exception x) {
                    logger.error(x, x);
                    if (message.length() > 0) {
                         message.append(", unknown virtual fair error(37) ");
                    } else {
                         message.append(" unknown virtual fair error(37) ");
                    return null;
    So please tell how that inner class will effect the serialization process of the instance of this calss?
    thanks in advance.

  • Error while getting the NotificationTemplate from NotificationService

    Hi all
    iam intrested in getting NotificationTemplate object using the NotificationService class' api using below code
       NotificationTemplate objtemplate =objNotificationService.lookupTemplate(templateName.trim(),enLocale);when i execute the above code iam getting the exception
    <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671I searched this on forums i found that it is due to different versions of the eclipselink.jar so i added the eclipselink.jar in my JDevloper's class path and also added same jar in the
    my Jdevloper's weblogic path C:\jdevweblogic11g\oracle_common\modules\oracle.toplink_11.1.1
    Still iam getting the the above exception.
    please suggest me some solution.

    Hi all
    when i run my below code as a standalone java application the code will execute fine..
    NotificationService objNotificationService =  client.getService(NotificationService.class);
    NotificationTemplate objtemplate =objNotificationService.lookupTemplate(templateName.trim(),enLocale);but when i execute the above mentioned code as a web application using ADF, JDEvloper 11.1.1.4 and weblogic server it will give me error below.
    <Jul 13, 2011 10:13:52 AM IST> <Error> <RJVM> <BEA-000503> <Incoming message header or abbreviation processing failed
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1583)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         Truncated. see log file for complete stacktrace
    >
    The exception ; ; nested exception is:
         java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671; nested exception is: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is:
         java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTable; local class incompatible: stream classdesc serialVersionUID = -3104383536215490874, local class serialVersionUID = -8219935847209476671
    javax.ejb.EJBException: ; nested exception is: so i replace all the refrencence of eclipcselink.jar file in my weblogic enviornment with the same version which iam using.
    still iam getting that same exception mentioned above.
    so please provide me some pointers to above problem.how we can tell weblogic server to load test. jar file insted of other version of test.jar
    Thanks and Regards.
    Edited by: Bipin Patil on Jul 12, 2011 11:42 PM

Maybe you are looking for

  • Who can help me use Time Machine to find some photos from a year ago?

    I need to know how to retrieve some photos from a year ago that should be stored on my ext. drive.  I have Time Machine....Mac OSX 10.9.1.  I have tried to do it and Time Machine tells me there is not enough room to download my old Picture Library. 

  • An error on purchasing an app in Applestore

    I have recently bought an iPad for my daughter so quite new to using apple products. I have tried to purchase an app through the Apple store but it does seem to have worked successfully. The app appears in my purchases but nowhere on my home pages. I

  • Photoshop CS 6 Extended - Glitch when saving 32bit exr files.

    Upon opening PS CS6 for the first time, if I create a layer with some pixel info on a transparent background with no alpha generated in the open file, and save it out as a 32 bit OpenExr, the first time it will do it correctly. It will automatically

  • Creating Smaller Sized PDFs from FM10

    Hello, I have Tech Comm Suite 3 (FM10, Acrobat X) and using Windows XP. Can I create a PDF out of FM and have it open in Acrobat 7 and later? I know I can manually select that in Acrobat after the document is created (Save As-->Reduced File Size), bu

  • R/3 Datasource for COSS, COSP, COSSP, COSPP

    Hello experts, I need to extract the data from COSS, COSP, COSSP, COSPP tables in R/3. Is there any BW Datasource that pulls the data from these or Do I need to create Generic extractors? I would greatly appeciate your help. Thanks Sri