-
1. Re: NoInitialContextException: New user trying samples
haytona Jan 8, 2002 3:40 PM (in response to rcatlin)i think you need to make sure that jndi.properties is available on the classpath AND that it is configured correctly for your server. Usually localhost is find during development.
-
2. Re: NoInitialContextException: New user trying samples
serogole Feb 14, 2002 8:52 AM (in response to rcatlin)Hello there,
I also new to jboss, and am having the same problem.
The jndi.properties file is on the classpath but no luck.
What else should I check?
Thank you
Lesetja -
3. Re: NoInitialContextException: New user trying samples
haytona Feb 14, 2002 4:18 PM (in response to rcatlin)my jndi.properties file contains the following:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
you could also see if a firewall? is stopping the data.
check no other apps are using port 1099. -
4. Re: NoInitialContextException: New user trying samples
sbhat Mar 17, 2003 1:04 PM (in response to rcatlin)Hi I am also new user trying examples.
I am also getting the same error for JNDI lookup.
1) I have included jndi.properties in the classpath
2) I have started and created queue from jmx-console.
I appreciate any input on my probelm.
Thanks
-------------------------------------------
my jndi.properties look like this
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider=localhost:1099
------------
This is part of my program using JNDI lookup
try {
jndiContext = new InitialContext();
} catch (Exception e) {
System.out.println("Couldnot create JNDI API Context:" +
e.toString());
System.exit(1);
}
try {
queueConnectionFactory = (QueueConnectionFactory)
jndiContext.lookup("ConnectionFactory");
queue = (Queue) jndiContext.lookup("queue/testQueue");
} catch (Exception e) {
System.out.println("JNDI lookup failed" + e.toString());
System.exit(1);
}
------------
This is the command I am using
java -cp /opt/hpws/jboss/server/default/lib/jboss-j2ee.jar:. -Djms.properties=/opt/hpws/jboss/server/default/conf/jndi.properties SimpleQueueSender testQueue 3
--------------------