2 Replies Latest reply on May 17, 2009 10:22 AM by cwulf

    Remote client calls problem after migration to JBoss AS 5

    cwulf

      Hello everyone,

      i try to migrate my JBoss 4.2.2 Application (and an Eclipse based remote client) to JBoss 5.0.0.
      I am getting some exceptions during remote calls of SLSBs and SFSBs on my client.

      The context creation and lookup has been performed correctly. As I see in the server log, the SFSB has been created.
      Calling method sendTextMessage of a SLSB causes:

      java.lang.NullPointerException
       at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:444)
       at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      ...
       at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
       at $Proxy3.invoke(Unknown Source)
       at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
       at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
       at $Proxy2.sendTextMessage(Unknown Source)
       at client.Client.main(Client.java:31)


      Calling method retrieve of SFSB causes:

      java.lang.ClassCastException: org.jboss.aop.joinpoint.MethodInvocation cannot be cast to org.jboss.ejb3.stateful.StatefulRemoteInvocation
       at org.jboss.ejb3.stateful.StatefulContainer.dynamicInvoke(StatefulContainer.java:552)
       at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56)
       at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
      ...
       at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
       at $Proxy3.invoke(Unknown Source)
       at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
       at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
       at $Proxy2.retrieve(Unknown Source)
       at client.Client.main(Client.java:36)


      Could that be a Class-Path problem? jbossall-client.jar and all it's dependencies are available...
      Client and server are running on JDK 1.5.0.

      Any ideas?

        • 1. Re: Remote client calls problem after migration to JBoss AS
          jaikiran

          Are you sure you are pointing to the same jbossall-client.jar that is available on the AS5 server?

          • 2. Re: Remote client calls problem after migration to JBoss AS
            cwulf

            Yes, the new jbossall-client.jar with the references only. I have a high inhibition threshold to post in this forum, so I check things like Class-Path several times ;-)

            I found the problem: I've included my ejb-jar into my small test client to make available the EJB interfaces. Eclipse adds the ejb-jar dependencies to the Class-Path: the JBoss server libs. Seems to me, that server classes have overwritten the client classes.
            Everything works fine, if I include the remote interfaces and client jars, only.
            Stupid fault, sorry!