4 Replies Latest reply on Oct 23, 2002 5:29 PM by Juha Lindfors

    Communication between JBoss 2.2.1 and JBoss 3.0.3

    Aaron Dressin Newbie

      I am having a very difficult time communicating between JBoss 2.2.1 and JBoss 3.0.3. I have a simple client class that is running within the JBoss 2.2.1 JVM and attempts to call upon an EJB deployed on a remote JBoss 3.0.3 JVM. Using jnp, I get a ClassCastException on the "narrow()" call. The object attempting to be narrowed is, "ReferencedPair".

      I have also attempted to use IIOP by using a JacOrb client. The error I get in this case is a ClassCastException on the "lookup()" call. The stack dump follows:
      Caught Exception: java.lang.ClassCastException: com.sun.corba.se.internal.corba.TypeCodeImpl
      java.lang.ClassCastException: com.sun.corba.se.internal.corba.TypeCodeImpl
      at org.jacorb.orb.CDROutputStream.write_value(CDROutputStream.java:1465)
      at org.jacorb.orb.Any.read_value(Any.java:802)
      at org.omg.CosNaming.NameHelper.insert(NameHelper.java:49)
      at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:152)
      at com.sun.jndi.cosnaming.CNCtx.callResolve(CNCtx.java:368)
      at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:417)
      at com.sun.jndi.cosnaming.CNCtx.lookup(CNCtx.java:395)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at com.agilix.lims.control.LIMSDelegate.delegateWork(LIMSDelegate.java:59)
      at com.agilix.lims.bic.LimsBicImpl.doWork(LimsBicImpl.java:20)
      at com.enterworks.apps.agents.bic.AsynchBIC.doWork(AsynchBIC.java:3267)
      at com.enterworks.apps.agents.bic.AsynchBIC.run(AsynchBIC.java:3170)
      at java.lang.Thread.run(Thread.java:484)


      Has anyone been able to communicate between these 2 servers?? I have been told by a technical support group (supporting the JBoss 2.2.1) that (and I quote), "...there is a compatibility issue between getting two different versions of JBoss to communicate with each other". Is this true??

        • 1. Re: Communication between JBoss 2.2.1 and JBoss 3.0.3
          Juha Lindfors Master

          It is true in some cases, not sure if it applies to your case or not.

          What is the stack trace you get when using narrow()? What errors you get (if any) when you use a normal Java cast for the lookup instead of narrow() ?

          And finally, what JDK versions are you running with?

          -- Juha

          • 2. Re: Communication between JBoss 2.2.1 and JBoss 3.0.3
            Aaron Dressin Newbie

            Here is the stack dump for jnp "narrow" call:
            java.lang.ClassCastException
            at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
            at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
            at com.a.lims.control.LIMSDelegate.delegateWork(LIMSDelegate.java:61)
            at com.a.lims.bic.LimsBicImpl.doWork(LimsBicImpl.java:20)
            at com.enter.apps.agents.bic.AsynchBIC.doWork(AsynchBIC.java:3267)
            at com.enter.apps.agents.bic.AsynchBIC.run(AsynchBIC.java:3170)
            at java.lang.Thread.run(Thread.java:484)

            I am using JDK 1.3.1_01 on client and JDK 1.3.1-b24 on server (JBoss 3)

            Thanks,
            Aaron

            • 3. Re: Communication between JBoss 2.2.1 and JBoss 3.0.3
              Aaron Dressin Newbie

              Oh... and here is the dump when I just do a plain java cast on the lookup call:
              java.lang.ClassCastException: org.jnp.interfaces.MarshalledValuePair
              at com.a.lims.control.LIMSDelegate.delegateWork(LIMSDelegate.java:61)
              at com.a.lims.bic.LimsBicImpl.doWork(LimsBicImpl.java:20)
              at com.e.apps.agents.bic.AsynchBIC.doWork(AsynchBIC.java:3267)
              at com.e.apps.agents.bic.AsynchBIC.run(AsynchBIC.java:3170)
              at java.lang.Thread.run(Thread.java:484)

              Please note that this is not a problem when I run this client from the command line both remotely and locally... only when I run it within the context of JBoss 2.2.1.

              Thanks, Aaron

              • 4. Re: Communication between JBoss 2.2.1 and JBoss 3.0.3
                Juha Lindfors Master

                well looks like the last class cast exception is coming from the naming implementation, so it seems its an incompatibility between the two different JBoss versions.