3 Replies Latest reply on Jun 25, 2008 4:47 PM by Maheswara Sunkara

    Running 4.2.2 and 4.0.3SP1 EJBs in the same environment

    Matthew Ellis Newbie

      I currently have a number of services deployed on different instances of JBoss 4.0.3SP1. This includes a mix of EJB2 and EJB3 SLSBs. The services are not clustered, just 'grouped' into different categories and deployed to different JBoss instances.

      Clients connect to the different JBoss instances when they need to - one operation may involve talking to 2 or 3 JBoss's remotely.

      I am looking to upgrade one or more of my instances to JBoss 4.2.2 however can foresee some issues with having clients needing to call SLSBs deployed on different versions of JBoss. At the moment all of my Java clients use jbossall-client.jar bundled with JBoss 4.0.3SP1 and also include the EJB3 client JARs.

      Here are the results of the tests I ran. Please let me know if you need any more detail.

      EJB3 Invocations

      Client with 4.0.3 client JAR invoking service deployed on JBoss 4.2.2
      When invoking the EJB3 service we got the following error. It appears that the remoting classes have changed - a quick Google search on how to resolve this issue didn't reveal anything obvious. There is only one thread that discusses it here http://www.mail-archive.com/jboss-user@lists.jboss.org/msg49952.html//www.mail-archive.com/jboss-user@lists.jboss.org/msg49952.html but it appears that you can only support one JBoss remoting version - either 1 or 2. Any ideas?
      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.remoting.InvokerLocator; local class incompatible: stream classdesc serialVersionUID = -4977622166779282521, local class serialVersionUID = -2909329895029296248]
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:707)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(InitialContext.java:351)

      Client with 4.2.2 client JAR invoking service deployed on JBoss 4.0.3
      When invoking the EJB3 service initially we the following error which is similar, just a different class.
      javax.naming.CommunicationException [Root exception is java.io.InvalidClassException: org.jboss.ejb3.remoting.BaseRemoteProxy; local class incompatible: stream classdesc serialVersionUID = 1126421850898582900, local class serialVersionUID = -2711693270411201590]


      EJB2 Invocations

      Client with 4.2.2 client JAR invoking service deployed on JBoss 4.0.3
      This worked fine!

      Client with 4.0.3 client JAR invoking service deployed on JBoss 4.2.2
      This did not work. When looking up the service we got this:
      java.lang.ClassNotFoundException: org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy (no security manager: RMI class loader disabled).
      This class was added in 4.0.4. Changing the client to use 4.0.4 created a whole new set of issues with the client throwing java.io.OptionalDataException and the server throwing EOFException's trying to read the incoming RMI call.

        • 1. Re: Running 4.2.2 and 4.0.3SP1 EJBs in the same environment
          Pinaki Newbie

          Hello Imellis85,
          I know this was posted a long time ago. Could you tell me how you resolved your issue. I am having a very similar problem where in I am migrating my J2EE application from 4.0.5.GA to jboss 4.2.2.GA
          I changed the necassary jbossall-client.jar file needed for compilation. There are no errors and as I see it no code changes are required.
          But it pops up the following error when I try to remotely access all the EJB2.1 I have on the server.
          javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException:org.jboss.invocation.unified.interfaces.UnifiedInvokerProxy (no security manager: RMI class loader disabled)]
          at org.jnp.interfaces.NamingCOntext.lookup(NamingContext.java:668)
          at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:520)
          at javax.naming.InitialContext.lookup(Unknown Source)

          If you or anyone else can shed some light on this matter, it would be most helpful.

          pc

          • 2. Re: Running 4.2.2 and 4.0.3SP1 EJBs in the same environment
            Pinaki Newbie

            Hey never mind. I fixed it. I thought I had replaced the new jbossall-client.jar in the client classpath but hadn't. Its running now.
            Thanks
            pc

            • 3. Re: Running 4.2.2 and 4.0.3SP1 EJBs in the same environment
              Maheswara Sunkara Novice

              Hi Pinaki,

              Can you please elaborate on what you did to resolve this problem?

              We are also trying to migrate jboss 4.0.5 to 4.2.2 and facing compatibility issues while accessing ejb2 on 4.2.2 from 4.0.3.

              our client app is on jboss 4.0.3 uses jdk 1.4 and
              app is on jboss 4.2.2 uses jdk 1.6

              Regards,
              Mahesh.