exception while creating initial context
- by Harish
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?