exception while creating initial context
Posted
by
Harish
on Server Fault
See other posts from Server Fault
or by Harish
Published on 2010-11-09T19:58:25Z
Indexed on
2012/04/09
11:32 UTC
Read the original article
Hit count: 466
in thread "main"
java.lang.NoClassDefFoundError: weblogic/kernel/KernelStatus
at weblogic.jndi.Environment.<clinit>(Environment.java:78)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
I am getting this exception when I try to create a initial context to hit the weblogic server. This is the code I am trying from eclipse.I have added weblogic.jar and wlclient.jar in the classpath.
Hashtable env = new Hashtable();
// WebLogic Server 10.x connection details
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory" );
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
env.put(Context.SECURITY_PRINCIPAL, "xxxxx");
env.put(Context.SECURITY_CREDENTIALS, "******");
return new InitialContext( env
Has anyone faced this issue,How to resolve it?
© Server Fault or respective owner