WLS ClassCastException "weblogic.jndi.internal.WLContextImpl cannot be cast to weblogic.jndi.internal.WLEventContextImpl" (Doc ID 2056509.1)

Last updated on SEPTEMBER 25, 2015

Applies to:

Oracle WebLogic Server - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms


On WLS 12.1.2.0 and higher versions, when attempting to restart managed server the following error is thrown.

weblogic.application.ModuleException: java.lang.ClassCastException: weblogic.jndi.internal.WLContextImpl cannot be cast to weblogic.jndi.internal.WLEventContextImpl
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:167)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80)
at weblogic.work.ContextWrap.run(ContextWrap.java:40)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)
Caused By: java.lang.ClassCastException: weblogic.jndi.internal.WLContextImpl cannot be cast to weblogic.jndi.internal.WLEventContextImpl
at weblogic.jndi.internal.WLEventContextImpl.equals(WLEventContextImpl.java:292)
at java.util.concurrent.ConcurrentHashMap$Segment.scanAndLock(ConcurrentHashMap.java:596)
at java.util.concurrent.ConcurrentHashMap$Segment.remove(ConcurrentHashMap.java:618)
at java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1176)
at weblogic.jndi.internal.JNDIEnvironment.removeConnectionTimeout(JNDIEnvironment.java:161)
at weblogic.jndi.internal.WLContextImpl.close(WLContextImpl.java:138)
at weblogic.jndi.internal.WLEventContextImpl.close(WLEventContextImpl.java:339)
at javax.naming.InitialContext.close(InitialContext.java:550)
at weblogic.ejb.container.deployer.ClientDrivenBeanInfoImpl.prepare(ClientDrivenBeanInfoImpl.java:934)
at weblogic.ejb.container.deployer.SessionBeanInfoImpl.prepare(SessionBeanInfoImpl.java:421)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:727)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:874)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:439)
at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:295)
at weblogic.application.internal.ExtensibleModuleWrapper$PrepareStateChange.next(ExtensibleModuleWrapper.java:285)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:109)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:172)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:167)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:80)
at weblogic.work.ContextWrap.run(ContextWrap.java:40)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:550)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:295)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:254)

 

 

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms