6 Replies Latest reply on Jul 19, 2007 5:15 AM by galrub

    ConnectionFactory not bound Exception... - Noobie

    galrub

      Hello ppl,

      I'm having a problem with lookup of the ConnectionFactory.
      Getting a not bound exception. it seems a common problem because I see it on google but can't find a solution!

      when deploying an EJB I got no problem looking it up on the standalone. (EJB3)

      system: Jboss 4.2.0.GA,. linux Fedora Core 7.
      getting the InitialCtx is like this:
      ----------------
      public static InitialContext getInitialContext()
      {
      Hashtable<String, String> h = new
      Hashtable<String, String>();
      h.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
      h.put("java.naming.provider.url", "localhost");
      try
      {
      return new InitialContext(h);
      }
      catch (NamingException e)........
      }
      ----------------

      when using JNDIview I can see on the global namespace
      the QueueConnectionFactory, but when looking it up or just looking up "ConnectionFactory" I get the exception.

      what am i doing wrong?

      thanks all,
      Gal

        • 1. Re: ConnectionFactory not bound Exception... - Noobie
          jaikiran

          Can you post the exception stacktrace?

          • 2. Re: ConnectionFactory not bound Exception... - Noobie
            galrub

            here is the stacktrace:
            --------------------------

            javax.naming.NameNotFoundException: ConnectionFactory not bound
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
            at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
            at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
            at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
            at sun.rmi.transport.Transport$1.run(Transport.java:153)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
            at java.lang.Thread.run(Thread.java:595)
            at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
            at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
            at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
            at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
            at javax.naming.InitialContext.lookup(InitialContext.java:351)
            at LookUptest.main(LookUptest.java:24)

            • 3. Re: ConnectionFactory not bound Exception... - Noobie
              galrub

              from what I can find on the net, it's seems that because nether it the datasources are in the global namespaces.... even thou that when trying a lookup for "QueueConnectionFactory" I get the same stacktrace with ConnectionFactory not bound... so it's not clear to if the namespaces are the problem or something else

              by the way, how do we move them datasources to global namespaces?

              • 4. Re: ConnectionFactory not bound Exception... - Noobie
                jaikiran

                The ConnectionFactory is bound to the global jndi namespace. Looking up "ConnectionFactory" should have returned you the connection factory. Is that all you see in the exception stacktrace or is there more in the stacktrace? If so, please post the entire exception stacktrace

                by the way, how do we move them datasources to global namespaces?


                http://wiki.jboss.org/wiki/Wiki.jsp?page=HowCanIAccessADataSourceFromAClient

                Make sure you read the note mentioned in bold, there.






                • 5. Re: ConnectionFactory not bound Exception... - Noobie
                  galrub

                  Yep... thats all I get

                  is there anyway to get a list of the jndi namespaces from the standalone? if so I will send it on this topic, maybe it can help.

                  THX

                  • 6. Re: ConnectionFactory not bound Exception... - Noobie
                    galrub

                    ...from A standalone... sry