4 Replies Latest reply on Aug 5, 2002 6:36 AM by Peter Todd

    Can't create the EJB client "java not bound".

    Peter Todd Newbie

      Any help on the following appreciated:

      I've successfully deploied on JBoss3.0 an EJB automatically generated by another system.

      In the client I can get the Context and Reference for this EJB but when I try and create
      the object on the client I get a "java not bound" error:

      .
      .
      InitialContext jndiContext = new InitialContext();
      System.out.println("Got EJB context");;
      .
      .
      Object ref = jndiContext.lookup("lawson/live_CU03_1");
      System.out.println("Got EJB reference");
      .
      .
      CU03_1 cu03_1 = cu03_1Home.create([username], [password]);
      System.out.println("DEBUG3");

      Output:

      lawson-cu01-client:
      [java] Got EJB context
      [java] Got EJB reference
      [java] java.rmi.ServerException: RemoteException occurred in server thread;
      nested exception is :
      [java] java.rmi.ServerException: Nested Exception:javax.naming.NameNotFoundException: java not bound

      I'm new to JBoss any help on this appreciated. Have previously deploied same EJB to weblogic but would
      like to try JBoss.

      Thanks,

      Peter Todd
      peter@petertodd.com

        • 1. Re: Can't create the EJB client "java not bound".
          Mikael Eriksson Novice

          Check the server log to see what happens there.

          It might be some misspelling when the bean tries to look up something in JNDI.

          Maybe, looking up java/comp (with no ':' ), instead of java:/comp.

          Regards

          • 2. Re: Can't create the EJB client "java not bound".
            Peter Todd Newbie

            Thanks for the reply.

            The first time the client is run the server log shows the following:
            2002-07-30 12:40:43,646 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Resized cache for bean live_CU01_1: old capacity = 1000000, new capacity = 50

            I can't edit the code in the EJB (automatically generated to give access to another system) but can edit the ejb-jar.xml and add a jboss.xml. I'm looking at this but still getting the same error when I try and run the client.

            Have done this successfully on Weblogic by first running ejbc on the automatically generated EJB before deploying it. I can also generate and run the jboss EJB Interest example on my PC without any problems.

            • 3. Re: Can't create the EJB client "java not bound".
              steve corrie Newbie

              I have the same problem. The lookup is fine, and won't work if I try anything else. I can use the returned home object to do findByPrimaryKey. It bombs out at create.
              Steve

              • 4. Re: Can't create the EJB client "java not bound".
                Peter Todd Newbie

                Now working - problem was in the ejb-jar.xml. env-entry with a name of "java.rmi.server.hostname" was not picked-up. If I edited the entry to "java/rmi/server/hostname" then all worked fine and my simple test client could connect to the ERP system.

                Don't know why this was or why the automatically generated bean should have this name but is working now..

                Thanks for your help.