2 Replies Latest reply on Jul 13, 2006 7:36 AM by ftiss

    PB with EJB while upgrading from 3.2.7 to 4.0.4

    ftiss

      I've an application which work fine with JBoss 3.2.7.
      I try to use it with JBoss 4.0.4. I've a problem while connecting with a EJB. I use the getHandle instruction, to obtain an handle on my EJB.
      When I use this handle with handle.getEJBObject(), I got the following :

      javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)

      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)

      at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)

      at javax.naming.InitialContext.lookup(InitialContext.java:347)

      at org.jboss.proxy.ejb.handle.StatefulHandleImpl.getEJBObject(StatefulHandleImpl.java:171)


      When I run the application with a debbuger, this is what I got for the handle :

      Handle I've got with JBoss 4.0.4.

      metaHandle: javax.ejb.Handle = {org.jboss.proxy.ejb.handle.StatefulHandleImpl@700}
      org.jboss.proxy.ejb.handle.StatefulHandleImpl
      id: java.lang.Object = {org.jboss.util.id.UID@701}
      invoker: org.jboss.invocation.Invoker = null
      invokerID: java.lang.Object = null
      invokerProxyBinding: java.lang.String = null
      jndiEnv: java.util.Hashtable = null
      jndiName: java.lang.String = "MetaSFR"
      objectName: int = 0




      Handle I've got with JBoss 3.2.7.

      metaHandle: javax.ejb.Handle = {org.jboss.proxy.ejb.handle.StatefulHandleImpl@6f8}
      org.jboss.proxy.ejb.handle.StatefulHandleImpl
      id: java.lang.Object = {org.jboss.util.id.UID@6f9}
      invoker: org.jboss.invocation.Invoker = {org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@6fa}
      invokerID: java.lang.Object = {org.jboss.util.id.GUID@6fb}
      invokerProxyBinding: java.lang.String = "stateful-rmi-invoker"
      jndiName: java.lang.String = "MetaSFR"
      objectName: int = 899834709

      As you can see, invoker is null under JBoss 4.0.4.
      I've surely done a mistake in my configuration. But where ?
      Thank you for your help