0 Replies Latest reply on May 2, 2002 7:22 AM by Frederic Soulier

    JBoss3.0RC1_Tomcat4.0.3: JNDI Names pbm

    Frederic Soulier Newbie

      Hi

      I have problems with JNDI names which don't seem to be deployed correctly by Jboss...

      This is part of my jboss.xml, I'm expecting the JNDI name for my AdministrationEJB to be ejb/Administration.
      Using http://localhost:8082/ I can see that JBoss uses the JNDI name AdministrationEJB instead...

      <?xml version="1.0" encoding="UTF-8"?>


      <enterprise-beans>
      <!-- Administration EJB -->

      <ejb-name>AdministrationEJB</ejb-name>
      <jndi-name>ejb/Administration</jndi-name>
      <resource-ref>

      <res-ref-name>jdbc/AdministrationDB</res-ref-name>
      <jndi-name>java:/jdbc/Cloudscape</jndi-name>
      </resource-ref>

      ...


      From http://localhost:8082/


      List of registered MBeans by domain:

      * JMImplementation
      o service=LoaderRepository,name=Default
      o type=MBeanServerDelegate

      * jboss.deployment
      o type=DeploymentScanner,flavor=URL

      * jboss.ejb
      o service=EJBDeployer

      * jboss.j2ee
      o service=EARDeployer
      o service=EJB,jndiName=AdministrationEJB


      From the JNDIView service (List operation)

      Global JNDI Namespace
      +- AdministrationEJB (proxy: $Proxy67 implements interface com.threegscene.openpayments.administration.AdministrationHome,interface javax.ejb.Handle)


      Going to:

      MBean View
      [JMX RI/1.0]

      * MBean Name: jboss.j2ee:service=EJB,jndiName=AdministrationEJB
      * MBean Java Class: org.jboss.ejb.StatelessSessionContainer

      and trying to getRemote, I get:

      472 MBean Failure

      The MBean [jboss.j2ee:service=EJB,jndiName=AdministrationEJB] throws an MBeanException when calling [getRemote]:
      java.lang.IllegalArgumentException: unknown operation! getRemote


      Back to the JNDIView service (List operation):

      java:comp namespace of the AdministrationEJB bean:
      Failed on lookup, javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory]

      javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory. Root exception is java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:190)
      at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:40)
      at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647)
      at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
      at javax.naming.InitialContext.init(InitialContext.java:217)
      at javax.naming.InitialContext.(InitialContext.java:173)
      at org.jboss.naming.JNDIView.list(JNDIView.java:106)
      at java.lang.reflect.Method.invoke(Native Method)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:492)
      at com.sun.jdmk.comm.HtmlInvokePage.buildPage(HtmlInvokePage.java:240)
      at com.sun.jdmk.comm.HtmlRequestHandler.processGetRequest(HtmlRequestHandler.java:325)
      at com.sun.jdmk.comm.HtmlRequestHandler.processRequest(HtmlRequestHandler.java:152)
      at com.sun.jdmk.comm.HtmlRequestHandler.doRun(HtmlRequestHandler.java:79)
      at com.sun.jdmk.comm.ClientHandler.run(ClientHandler.java:84)
      at java.lang.Thread.run(Thread.java:479)

      Well, jnpserver.jar is in the $JBOSS_HOME/lib so...

      Any help appreciated.
      Thanks
      Fred