Uploaded image for project: 'EJB 3.0'
  1. EJB 3.0
  2. EJBTHREE-468

Exception serialization problem with remote access

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • EJB 3.0 RC5 - PFD
    • None
    • None

    Description

      In a statefull sessin bean I redirect a possible Exception like this

      catch (Exception e)

      { // do something throw e; }

      At the client side this results in an error message like this:

      [junit] Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:
      [junit] java.io.InvalidClassException: javax.ejb.EJBException; local class incompatible: stream classdesc serialVersionUID = 2512003687642492863, local class serialVersionUID = 796770993296843510
      [junit] java.rmi.MarshalException: Failed to communicate. Problem during marshalling/unmarshalling; nested exception is:
      [junit] java.io.InvalidClassException: javax.ejb.EJBException; local class incompatible: stream classdesc serialVersionUID = 2512003687642492863, local class serialVersionUID = 796770993296843510
      [junit] at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:292)
      [junit] at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:136)
      [junit] at org.jboss.remoting.Client.invoke(Client.java:444)
      [junit] at org.jboss.remoting.Client.invoke(Client.java:407)
      [junit] at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
      [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [junit] at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
      [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [junit] at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
      [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [junit] at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
      [junit] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
      [junit] at org.jboss.ejb3.stateful.StatefulRemoteProxy.invoke(StatefulRemoteProxy.java:133)
      [junit] at $Proxy1.createOrganisation(Unknown Source)
      [junit] at de.visiodesk.DataCleanup.testCleanupAllData(DataCleanup.java:60)
      [junit] Caused by: java.io.InvalidClassException: javax.ejb.EJBException; local class incompatible: stream classdesc serialVersionUID = 2512003687642492863, local class serialVersionUID = 796770993296843510
      [junit] at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
      [junit] at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
      [junit] at java.io.ObjectInputStream.readClassDesc(Unknown Source)
      [junit] at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      [junit] at java.io.ObjectInputStream.readObject0(Unknown Source)
      [junit] at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      [junit] at java.io.ObjectInputStream.readSerialData(Unknown Source)
      [junit] at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      [junit] at java.io.ObjectInputStream.readObject0(Unknown Source)
      [junit] at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
      [junit] at java.io.ObjectInputStream.readSerialData(Unknown Source)
      [junit] at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
      [junit] at java.io.ObjectInputStream.readObject0(Unknown Source)
      [junit] at java.io.ObjectInputStream.readObject(Unknown Source)
      [junit] at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
      [junit] at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
      [junit] at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:265)

      If I change the code above to sommething like this

      catch (Exception e)

      { // do something throw new Exception e; }

      Everything works, the exception is passed to the client without any problem.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lindner-1 Stefan Lindner (Inactive)
              Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: