10 Replies Latest reply on Sep 3, 2013 3:35 AM by wdfink

    javax.naming.NameNotFoundException: global/...

    goot

      when I try to lookup my Remote EJBClass, I receive this NameNotFoundException:

       

      javax.naming.NameNotFoundException: global/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote -- service jboss.naming.context.java.jboss.exported.global.foo_business_ear-ear.foo_business_ear-ejb."LoginBean!foo.business.login.LoginBeanRemote"
        at org
      .jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97)
        at org
      .jboss.as.naming.NamingContext.lookup(NamingContext.java:178)
        at org
      .jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:127)
        at org
      .jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:73)
        at java
      .util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java
      .util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java
      .lang.Thread.run(Unknown Source)

      ERROR
      : org.jboss.naming.remote.protocol.v1.RemoteNamingStoreV1 - Channel end notification received, closing channel Channel ID ef1b671f (outbound) of Remoting connection 6af39445 to localhost/127.0.0.1:4447{

       

      My JNDI Lookup name is:

      java:global/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

       

      However I think the ejb is deployed correctly and I tried every possible lookup name to make a lookup.

       

      I added a screenhot of my JNDI View.

       

      Do you have any Idea what I could have missed?

       

      Client is a Tomcat 5.0

      EJB Server is JBoss AS 7.1.1

        • 1. Re: javax.naming.NameNotFoundException: global/...
          andilog

          NameNotFoundException is a problem with JNDI name.

          Try JNDI name

          java:global/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

           

          When you deploy your ear-file, you should see JNDI info for LoginBean in your log.

           

          As I see on your screenshot it might be also:

          java:global/recc_business_ear-ear/recc_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

          • 2. Re: javax.naming.NameNotFoundException: global/...
            goot

            Unfortunately this Is my JNDI name. I'm pretty confused here.

            • 3. Re: Re: javax.naming.NameNotFoundException: global/...
              andilog
              <subsystem xmlns="urn:jboss:domain:ee:1.0" >
                <ear-subdeployments-isolated>false</ear-subdeployments-isolated>
              </subsystem>
              

               

              Add this to your standalone.xml (if not done yet).

              This should make your ear visible for the war file.

               

              Stil getting same error?

              • 4. Re: Re: javax.naming.NameNotFoundException: global/...
                goot

                I was missing this config in my standalone.xml but I still get the same error.

                • 5. Re: javax.naming.NameNotFoundException: global/...
                  andilog

                  Please post the JNDI info from log about LoginBean.

                   

                  And post fully quilified name (package+class) of your classes which belong to LoginBean.

                   

                  Btw if you are connecting as remote (not deployed on the same server), your JNDI name would be something like:

                  ejb:/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

                  or

                  ejb:/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote?stateless

                  • 6. Re: javax.naming.NameNotFoundException: global/...
                    goot

                    java:global/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

                    java:app/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

                    java:module/LoginBean!foo.business.login.LoginBeanRemote

                    java:jboss/exported/foo_business_ear-ear/foo_business_ear-ejb/LoginBean!foo.business.login.LoginBeanRemote

                    java:global/foo_business_ear-ear/foo_business_ear-ejb/LoginBean

                    java:app/foo_business_ear-ejb/LoginBean

                    java:module/LoginBean

                     

                    When I change the jndi name to ejb:/foo ... I get an "EJB Receiver Not Found" Exception.

                    • 7. Re: javax.naming.NameNotFoundException: global/...
                      andilog

                      You marked my reply as correct answer, did you solve the problem?

                      • 8. Re: javax.naming.NameNotFoundException: global/...
                        goot

                        My lookup name was incorrect.

                        The correct lookup name was "ejb:foo_business_ear-ear/foo_business_ear-ejb//ClassName!InterfacePath".

                        This is not exactly your suggested path but it led me to the correct answer.

                        I didn't test whether the configuration in the standalone.xml had any influence, yet.

                         

                        OT:

                        Do you know how I can provide mutliple access to the JBoss Server?

                        When I try to access the bean for the second time, I receive the EJB Receiver not found Exception, until I reboot the client server.

                        • 9. Re: javax.naming.NameNotFoundException: global/...
                          andilog

                          No idea. I would start searching on the web and documentation.

                           

                          Maybe you could check whether you are using a singleton bean.

                          • 10. Re: javax.naming.NameNotFoundException: global/...
                            wdfink

                            The "ejb:" prefix is related to the used approach (ejb-client or remote-naming) for the InitialContext.

                            The Exception might be a solved issue, mybe you check it with a AS7.2 (EAP6.1.0.Alpha) server.

                            How your environment look like? From what I understand the EJB-client is a web-app deployed on tomcat.

                            Also could you post the relevant source-code and configuration for the ejb invocation?