parvesh sharma

Greenhorn
+ Follow
since Dec 01, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by parvesh sharma

Hi All,

I am getting following error while performing look up.

javax.naming.ConfigurationException: Name space accessor for the java: name space has not been set. Possible cause is that the user is specifying a java: URL name in a JNDI Context method call but is not running in a J2EE client or server environment.
at com.ibm.ws.naming.java.javaURLContextFactory.isNameSpaceAccessable(javaURLContextFactory.java:98)
at com.ibm.ws.naming.urlbase.UrlContextFactory.getObjectInstance(UrlContextFactory.java:73)
at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:591)
at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:540)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:287)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at messaging.MessageClient.main(MessageClient.java:72)




The code for the look up is as follows:

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:2809");

Context context = new InitialContext(env);

QueueConnectionFactory qConnectionFactory = (QueueConnectionFactory)context.lookup("java:comp/env/jms/vendorCF");


JNDI name that I have specified in the server is jms/vendorCF.

I tried by giving exact jndi name that is :
context.lookup("jms/vendorCF");

but it throws a different exception as follows:
javax.naming.NameNotFoundException: Context: KC06015/nodes/KC06015/servers/server1, name: jms/vendorCF: First component in name jms/vendorCF not found. Root exception is org.omg.CosNaming.NamingContextPackage.NotFound

Thanks

Parvesh
HI Linda,

It seems that you are mising some class file in the class path. Please place the exception log, along with the specific code(line), so that exact problem could be figured out.

regards
19 years ago
Hi Selvi,

Try, placing the classes12.zip in WEB-INF/lib directory.

Hope this resolves the problem

Parvesh.