You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Rahul Kirthivasan <he...@yahoo.com> on 2001/06/04 16:47:26 UTC
javax.naming.NoInitialContextException error when trying to bind from SOAP service bean
Hi all,
I am having problems accessing an EJB Bean from within
a java class deployed at a Apache SOAP (2.1) URN
endpoint in TOMCAT(3.2.1). When I use JNDI to call
lookup, I get the following error. The EJB bean is
registered with the JNDI service in J2EE 1.3 and I
also have the J2EE server running. The problem does
not occur if I try to call lookup from a standalone
application. I also have added the client wrapper
stub that J2EE's deploytool generated in Tomcat
server's class path. Is there anything else that I
need to do to specify that Tomcat should lookup J2EE
JNDI service ?
Code :
Properties props = System.getProperties();
InitialContext jndiContext = new
InitialContext(props);
java.lang.Object objref =
jndiContext.lookup("MyTestBeanJNDIName");
Error Message :
Looking up EJB reference
javax.naming.NoInitialContextException: Need to
specify class name in environme
t or system property, or as an applet parameter, or in
an application resource
ile: java.naming.factory.initial
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:
46)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:24
)
at
javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.ja
a:283)
at
javax.naming.InitialContext.lookup(InitialContext.java:350)
Thanks,
Rahul
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org