5 Replies Latest reply on Jan 11, 2004 3:15 AM by milowe

    Can't get my EJB names into jndi

    wcn00

      I have a demo application which deploys on WebLogic, Oc4j, and Jrun successfully.
      When I deploy it on Jboss none of the jndi names are found when looked up via
      Object RemoteRef = ic.lookup("ectsCCIDemo");


      The session EJB is referenced in the web.xml like this:
      <ejb-ref>
      <ejb-ref-name>ectsCCIDemo</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      com.ObjectStar.examples.ectsCCIDemoHome
      com.ObjectStar.examples.ectsCCIDemo
      <ejb-link>ectsCCIDemo</ejb-link>
      </ejb-ref>

      So I created a jboss-web.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web>
      <ejb-ref>
      <ejb-ref-name>ectsCCIDemo</ejb-ref-name>
      <jndi-name>ectsCCIDemoWanker</jndi-name>
      </ejb-ref>
      <resource-ref>
      <res-ref-name>eis/OigAdapter</res-ref-name>
      <jndi-name>OigAdapter</jndi-name>
      </resource-ref>
      </jboss-web>

      That didn't help. If I list the jndi contents I dont' see any of my ejb names:


      13:41:48,130 INFO [STDOUT] jmx: org.jnp.interfaces.NamingContext
      13:41:48,130 INFO [STDOUT] OIL2XAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory
      13:41:48,131 INFO [STDOUT] HTTPXAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory
      13:41:48,131 INFO [STDOUT] ConnectionFactory: org.jboss.mq.SpyConnectionFactory
      13:41:48,131 INFO [STDOUT] UserTransactionSessionFactory: $Proxy10
      13:41:48,131 INFO [STDOUT] HTTPConnectionFactory: org.jboss.mq.SpyConnectionFactory
      13:41:48,132 INFO [STDOUT] XAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory
      13:41:48,132 INFO [STDOUT] invokers: org.jnp.interfaces.NamingContext
      13:41:48,132 INFO [STDOUT] UserTransaction: org.jboss.tm.usertx.client.ClientUserTransaction
      13:41:48,132 INFO [STDOUT] UILXAConnectionFactory: javax.naming.LinkRef
      13:41:48,132 INFO [STDOUT] RMIXAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory
      13:41:48,133 INFO [STDOUT] UIL2XAConnectionFactory: org.jboss.mq.SpyXAConnectionFactory
      13:41:48,133 INFO [STDOUT] topic: org.jnp.interfaces.NamingContext
      13:41:48,133 INFO [STDOUT] queue: org.jnp.interfaces.NamingContext
      13:41:48,133 INFO [STDOUT] console: org.jnp.interfaces.NamingContext
      13:41:48,134 INFO [STDOUT] UIL2ConnectionFactory: org.jboss.mq.SpyConnectionFactory
      13:41:48,134 INFO [STDOUT] UILConnectionFactory: javax.naming.LinkRef
      13:41:48,134 INFO [STDOUT] RMIConnectionFactory: org.jboss.mq.SpyConnectionFactory
      13:41:48,134 INFO [STDOUT] OIL2ConnectionFactory: org.jboss.mq.SpyConnectionFactory
      13:41:48,135 INFO [STDOUT] UUIDKeyGeneratorFactory: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory

      No mention of any of my jndi names!


      Also, I do not see any jndi binding messages when I deploy this app either which is curious...

      Any thoughts out there?

      wcn

        • 1. Re: Can't get my EJB names into jndi
          wcn00

          More on this:
          deployed just the ejb.jar file from my app and no errors occured but no jndi entries wer created either.

          If I take an application (arno) and do the same thing jndi entries are created!
          I've compared deployment descriptors to the best of my ability and they all appear to be valid!

          Is there a verbose mode for this server? I need some debugging messges..
          wcn

          • 2. Re: Can't get my EJB names into jndi
            milowe

            You can view the JNDI bindings in jmx-console. (http://yourServer:yourPort/jmx-console)

            • 3. Re: Can't get my EJB names into jndi

              Have u build the correct jboss ejb deplyment descriptor ?

              THe only jboss-web.xml is not enough.

              Try to lookup using "java:comp/env/ectsCCIDemo" (not only ectsCCIDemo).



              • 4. Re: Can't get my EJB names into jndi
                wcn00

                Ahh! or perhaps it should be arg...

                I narrowed it down by process of elimination to the MANIFEST.MF file I used in my ejb jar. It had a classpath in it. When I removed the custom manifest in favor of ant's generated default one the ejb's deployed as you would expect.
                Not very intuitive...
                For your reading pleasure, the offending manifest file:

                Manifest-Version: 1.0
                Created-By: Apache Ant 1.5
                Class-Path: ects.jar:xerces.jar:oigadapter.jar



                Wendell Nichols aka wcn00

                • 5. Re: Can't get my EJB names into jndi
                  milowe

                  Or you could try to deploy with orginal manifest file excluding xerces.jar from Class-path. It might create conflicts with JAXP version used by JBoss.