0 Replies Latest reply on Jun 27, 2003 1:25 PM by rkbeach

    NameNotFoundException...

    rkbeach Newbie


      Hi All,

      I posted a slight variation of the following problem with a title 'JNDI Problem - Confusing...' a couple of
      days back...I changed certain things, and am now facing a different problem...can you please take a look?

      Environment:

      Weblogic 7
      JBoss 3.0.4
      Solaris 2.8

      What I am trying to do:

      An MDB running in the Weblogic context (running on machine A) looks up a Stateless Session Bean deployed under JBoss (running on machine B).
      A reference (HomeHandle reference) of the just looked up Session Bean is stored in a HashMap for re-use, since JNDI lookups can be expensive. This HomeHandle Reference is used to get the corresponding EJBHome, and using that EJBHome, I plan on creating the Remote Reference to the Session Bean for future lookup requests.

      Now, the problem I am running into:

      When I try to get the EJBHome using the HomeHandle reference I just stored in the HashMap, I get the following Exception:

      java.rmi.ServerException: Could not get EJBHome; nested exception is:
      javax.naming.NameNotFoundException: Unable to resolve 'billing.invoiceBean' Resolved: 'billing'
      Unresolved:'invoiceBean' ; remaining name 'invoiceBean'
      javax.naming.NameNotFoundException: Unable to resolve 'billing.invoiceBean' Resolved: 'billing'
      Unresolved:'invoiceBean' ; remaining name 'invoiceBean'
      at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
      at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:262)
      at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:229)
      at weblogic.jndi.internal.ServerNamingNode_WLStub.lookup(Unknown Source)
      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:337)
      at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:332)
      at javax.naming.InitialContext.lookup(InitialContext.java:345)
      at org.jboss.proxy.ejb.handle.HomeHandleImpl.getEJBHome(HomeHandleImpl.java:72)
      at servicelocator.local.VerifiedServiceLocator.lookup(VerifiedServiceLocator.java:193)
      at local.request.RequestMDB.lookupInvoiceBean(RequestMDB.java:103)
      at local.request.RequestMDB.onMessage(RequestMDB.java:64)
      at weblogic.ejb20.internal.MDListener.execute(MDListener.java:356)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)

      I am thinking that the Weblogic container is looking for the InvoiceBeanHomeImpl (the client stub)
      when I call 'homeHandle.getEJBHome()', but since I only have the InvoiceBeanHome.class and InvoiceBean.class in the Weblogic container classpath, it's throwing this exception...This InvoiceBean is deployed in JBoss.

      So, I don't have any stubs,skeletons generated. I do have jboss-client.jar, jbossall-client.jar, jnp-client.jar in the classpath of the Weblogic container.

      I would like to generate the client stub for the InvoiceBean (deployed in JBoss), but am not sure how...since there's no EJB Compiler that comes along with the JBoss distribution...and put those in the Weblogic container classpath...and hopefully, the problem would be resolved...

      Or, am I completley wrong in my above assumption...and the problem lies elsewhere?

      Can anyone help?

      Thanks much,
      Srini