Hi All,
My
java client program is unable to do a lookup for Local Home Interface.
Error Message:
>> javax.naming.NameNotFoundException: No object bound for
>> java:comp/env/ejb/Movie
>> at com.sun.enterprise.naming.java.javaURLContext.lookup
>> javaURLContext.java:116)at javax.naming.InitialContext.lookup
>> (InitialContext.java:347)
>> at MoviesClient.go(MoviesClient.java:40)
>> at MoviesClient.main(MoviesClient.java:31)
Client Program:
>> Context ic =new InitialContext();
>> Object o = ic.lookup("java:comp/env/ejb/Movie");
Server XML (sun-j2ee-ri.xml):
<
ejb>
<ejb-name>MovieBean</ejb-name>
<jndi-name>Movie</jndi-name>
:
:
</ejb>
As the message shows Naming service could not lookup the name.
I'm trying to run an example on J2EE RI 1.3
Also note that I'm able to do a lookup for Remote Home without any problems.
The only difference is for Remote Lookup I have used the JNDI name directly.
>> Context ic =new InitialContext();
>> Object o = ic.lookup("Customer");
I have also tried same approach for the Local Home Interface. But then it gives::
javax.naming.NameNotFoundException: Movie not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.
java:174)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.ja
va:146)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialCont
extProviderImpl.java:63)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProviderImpl_Tie
._invoke(Unknown Source)
at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegat
e.java:355)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:255)
at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProces
sor.java:84)
at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadP
ool.java:99)
During deployment, server also shows the message :
Binding name:`java:comp/env/ejb/Movie`
Please let me know what do I need to do to resolve this problem.
Thanks and Regards