Friday, February 19, 2016

weblogic.security.subject.SubjectManager.getSubjectManager hangs when using wrong JDK

Trying to connect from Eclipse to a WLS, Java client for EJB, using 2 way SSL and t3s, we get a stuck thread on this:

"main" #1 prio=5 os_prio=0 tid=0x000000000263f000 nid=0x12900 in Object.wait() [0x0000000002a6d000]
   java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x00000000d8d00d00> (a java.lang.Object)
 at java.lang.Object.wait(Object.java:502)
 at weblogic.security.subject.SubjectManager.getSubjectManager(SubjectManager.java:277)
 - locked <0x00000000d8d00d00> (a java.lang.Object)
 at weblogic.security.subject.SubjectManager$GetKernelIdentityAction.run(SubjectManager.java:440)
 at weblogic.security.service.SecurityManager.getKernelIdentity(SecurityManager.java:164)
 at weblogic.security.service.GetKernelIdentityAction.run(GetKernelIdentityAction.java:25)
 at java.security.AccessController.doPrivileged(Native Method)
 at weblogic.jndi.WLSJNDIEnvironmentImpl.(WLSJNDIEnvironmentImpl.java:57)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:264)
 at weblogic.jndi.internal.JNDIEnvironment.getJNDIEnvironment(JNDIEnvironment.java:37)
 at weblogic.jndi.Environment.(Environment.java:92)

...


The issue was solved changing JDK


5 comments:

hdohlmann said...

I have the exact same issue.
Am running jdk 1.8.0.72.
Which JDK did you switch to?

Pierluigi Vernetto said...

I have switched to JDK 7... must be Update 91 or so...

hdohlmann said...

Downgraded from 8?
Hmm, not an option. Must look for other solutions...

Dániel Kovács said...

Got the same error (with Java8 and Java7), the underlying issue is that no SubjectManager is installed yet, and then there is a "wait" on the thread, until somebody installs one...

The solution for me was to include a component in the classpath that installs a SubjectManager -- and it must be *before* WebLogic in the classpath.

Magic, in 2016 :)

Jivi said...

That worked for me.
Thanks a lot for pointing me in the right direction Daniel!