Hi,
I'm using jboss 3.0.4, and I'm trying to write a simple client for a simple entity EJB...
But I'm getting this error:
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
From searching the forum I know that this is caused by not having jndi.properties in the classpath...
But in the quickstart docs, it says:
"When you use the JNDI API within the same VM that the JBoss server is
running do not have to perform any special configuration to create a
JNDI InitialContext. You simply create an InitialContext without any
arguments."
I'm using the same "java" command to launch jboss as I use to launch the
client, so I'm pretty sure this is the case... Or is do they mean something else by "same VM"?
If not, then I understand it should just run without the jndi.properties file in the classpath, right?
Thanks
Hans
Using the same java command does not mean both jboss and your client are running in the same vm. In your case, you do need the jndi.properties on your cp for the client. Your client is running in a different vm than jboss server.
-prabhakar