1 Reply Latest reply on Jul 5, 2010 4:05 PM by Ron Sigal

    Need help invoking EJB 2.0 on JBoss 4.3.0 from JBoss 4.0.5 client

    Clive Hill Newbie

      With a client on JBoss 4.0.5 invoking an EJB on JBoss 4.3.0

      The client gets the error:


      ERROR [org.jboss.remoting.transport.socket.SocketClientInvoker] Got
      marshalling exception, exiting
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1316)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
      at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
      at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)


      Obviously, the classes in the chain of interceptors are different between the two versions


      As I understand it the way to resolve this is to set:

      -Djboss.remoting.pre_2_0_compatible=true on the 4.3.0 instance.


      This works for the EJB call, but has a disasterous side effect on JMS.


      Now, if I try to use a JMS client (JBM) to the 4.3.0 instance there is this error:

      ERROR [org.jboss.remoting.transport.socket.ServerThread] Worker thread initialization failure

      java.lang.IllegalArgumentException: Invalid packet type: 369098752

                  at org.jboss.jms.wireformat.PacketSupport.createPacket(PacketSupport.java:379)

                  at org.jboss.jms.wireformat.JMSWireFormat.read(JMSWireFormat.java:290)

                  at org.jboss.remoting.transport.socket.ServerThread.versionedRead(ServerThread.java:701)

                  at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:569)

                  at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:406)

                  at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)

        • 1. Re: Need help invoking EJB 2.0 on JBoss 4.3.0 from JBoss 4.0.5 client
          Ron Sigal Master

          Hi Clive,


          Yeah, that's a problem.  Setting the -Djboss.remoting.pre_2_0_compatible=true flag affects Remoting throughout the JVM, so you can't satisfy both EJB and JBossMessaging.  I don't think there's a way around that in AS 4, which uses Remoting version 2.2.x.


          On the other hand, AS 5 uses Remoting 2.4/2.5, which has an option for setting the "remotingVersion" parameter on each Remoting Connector.  So, in $JBOSS_HOME/server/$CONFIG/deploy/remotng-jboss-beans.xml, you could update the "UnifiedInvokerConfiguration" bean with


          <!-- Parameters visible to both client and server -->
                <property name="invokerLocatorParameters">
                   <map keyClass="java.lang.String" valueClass="java.lang.String">


          That would configure EJB2 to use the old wire format, and JBossMessaging would default to the new wire format.