Hi,
I coded a stateless session bean. It is successfully deployed in
J2EE 1.4 Server.
But when I want to run client, I have the error below. Please help me. I almost can not stand the EJB including
JBoss / J2EE server.
what is the difference?
1. lookup("name");
2. lookup("java:com/env/ejb/name");
if I set the JNDI name as "name" in descriptor XML file, which one I should use? or are same?
Thanks.
Edward
//--------------------------
C:\temp>
java -classpath %CLASSPATH%;C:\temp\TestClient.jar Client
Starting Client . . .
Looking up the sign on component via JNDI.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file:
java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at Client.main(Client.java:18)