Getting exception while runningthe client program. Root exception is javax.naming.NameNotFoundException...


I deployed a simple ejb application on to the weblogic server but when I run the client program, I am getting the following error

before lookup
Exception in thread "main" javax.naming.NameNotFoundException: Unable to resolve
 'HelloHome'. Resolved '' [Root exception is javax.naming.NameNotFoundException:
 Unable to resolve 'HelloHome'. Resolved '']; remaining name 'HelloHome'
        at weblogic.rjvm.ResponseImpl.unmarshalReturn(
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef
        at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef
        at weblogic.jndi.internal.ServerNamingNode_910_WLStub.lookup(Unknown Sou
        at weblogic.jndi.internal.WLContextImpl.lookup(
        at weblogic.jndi.internal.WLContextImpl.lookup(
        at javax.naming.InitialContext.lookup(Unknown Source)
        at examples.HelloClient.main(
Caused by: javax.naming.NameNotFoundException: Unable to resolve 'HelloHome'. Re
solved ''
        at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
        at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.jav
        at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.j
        at weblogic.jndi.internal.BasicNamingNode.lookup(
        at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
        at weblogic.rmi.internal.BasicServerRef.invoke(
        at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef
        at weblogic.rmi.internal.BasicServerRef$
        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
        at weblogic.rmi.internal.BasicServerRef.access$300(
        at weblogic.rmi.internal.BasicServerRef$
        I am giving my client program and deployment descriptors.
        package examples;
      import javax.naming.Context;
      import javax.naming.InitialContext;
      import java.util.Properties;
      public class HelloClient {
            public static void main(String[] args) throws Exception {
                  //Properties prop = System.getProperties();
                  Properties prop = new Properties();
                  Context ctx = new InitialContext(prop);
                  System.out.println("before lookup");
                  Object obj = ctx.lookup("HelloHome");
                  System.out.println("after lookup");
                  HelloHome home = (HelloHome) javax.rmi.PortableRemoteObject.narrow(obj, HelloHome.class);
                  Hello hello = home.create();

my xml files


<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "">



<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "">
After compiling the java files, I created the jar file that includes xml files and classfiles.  Then using weblogic.ejbc I created the jar file
which I deployed in the weblogic server. I used weblogic admin console to deploy.

Until this point there was no error but when I run the client, I get the above said error.

My ejb files structure is as follows

my directory/java files
            /examples/class files
I am new to weblogic. I will be thankful if anybody can tell me where did I go wrong and help me out in solving the problem.

Thanks in Advance.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


are you sure that your ejb is correctly deployed in the server ? Check the JNDI tree.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
savita_gomatamAuthor Commented:

Thanks for the response.
Yes. It is deployed correctly.  Now it is working.  I didn't start the ejb in the weblogic server.  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java App Servers

From novice to tech pro — start learning today.