Naming Exception


EJB programming & troubleshooting: Naming Exception

  1. Naming Exception (3 messages)

    I am trying to create a stateless session bean. When I run the client, I am getting the following exception. Can anyone help me out please.

    javax.naming.NameNotFoundException: Unable to resolve test. Resolved:'' Unresolved:'test' ; remaining name ''
            at weblogic.rmi.internal.BasicOutboundRequest.sendReceive(BasicOutboundR
            at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
            at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
            at weblogic.rmi.internal.ProxyStub.invoke(
            at $Proxy0.lookup(Unknown Source)
            at weblogic.jndi.internal.WLContextImpl.lookup(
            at javax.naming.InitialContext.lookup(Unknown Source)
            at client.main(

    Thanks in advance

    Threaded Messages (3)

  2. Questions[ Go to top ]

    A few questions

    What are you trying to resolve?
       If its a bean I'd expect code like (for Websphere)

            Properties p = new Properties();

    //The JNDI properties you set depend
    //on which server you are using.
    p.put(Context.INITIAL_CONTEXT_FACTORY, "");
    p.put("", "user");
    p.put("", "password");

    try {
    InitialContext ic = new InitialContext(p);
    Object objRef = ic.lookup("ejb/com/company/Mybean");
    javax.ejb.EJBHome objHome = (javax.ejb.EJBHome)

    Have you configured your server with the corresponsing JNDI entries for the bean or whatever else you are looking up?

    Which application server are you using ?
  3. Thanks[ Go to top ]

    I was able to find out the problem. Thanks for the response.
  4. info...[ Go to top ]


     Am facing the same problem, could you please let me know of the exact problem because of which this is happening, and what was done to fix it.

    many thanks.