Hi,
I am trying to implement JMS Queues in simple
java program(Not a
J2EE application).I am using the jndi.properties to define the queue names and the connection factory.
I have placed the jndi.properties file in the current directory and configured the jndi.properties entry in my classpath. But still I am facing the following exception
Error connecting to null queue...
.................... 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(NamingManager.java:645)
.................... at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
.................... at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
.................... at javax.naming.InitialContext.lookup(InitialContext.java:351)
.................... at com.gtech.esc.server.engine.JMSMessageHandler$UnsoRequestQueue.run(JMSMessageHandler.java:413)
I didnt face any problem when creating the initialContext but i am facing this issue when it tries to lookup
Line No 412 & 413 in JMSMessageHandler :
initialContext = new InitialContext();
connFactory = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
Could anyone please provide me a solution for this problem.
Thanks
Prasanna