Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Solution to: javax.naming.AuthenticationException. Root exception is java.lang.SecurityException: attempting to add an object which is not an instance of java.security.Principal to a Subject's Principal Set

13 views
Skip to first unread message

Geoffrey Steffens

unread,
Oct 11, 2001, 12:56:54 AM10/11/01
to
Hello world,

To anybody who receives this irritating error in a Java client
application attempting to access Weblogic Server 6.1 (and possibly
weblogic server 6):

javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: attempting to add an object which is not
an instance of java.security.Principal to a Subject's Principal Set

The cause of your problem is having JAAS explicitly in your classpath.
It somehow messes up authentication to WebLogic. Remove it and your
problem will disappear.

The complete exception was:

javax.naming.AuthenticationException. Root exception is
java.lang.SecurityException: attempting to add an object which is not
an instance of java.security.Principal to a Subject's Principal Set

at javax.security.auth.Subject$SecureSet.add(Subject.java:1098)

at weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootServicesStub.java:72)

at weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java:80)

at weblogic.security.acl.internal.Security.authenticate(Security.java:108)

at weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFactoryDelegate.java:509)

at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:364)

at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:336)

at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:208)

at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:149)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)

at javax.naming.InitialContext.init(InitialContext.java:222)

at javax.naming.InitialContext.<init>(InitialContext.java:198)

at au.com.orrcon.orrconcentral.Application.<init>(Application.java:87)

at au.com.orrcon.orrconcentral.Application.getApp(Application.java:52)

at au.com.orrcon.orrconcentral.orrconCentral.<init>(orrconCentral.java:130)

at au.com.orrcon.orrconcentral.orrconCentral.main(orrconCentral.java:219)

Steve Wesemeyer

unread,
Nov 19, 2001, 1:04:18 PM11/19/01
to
I have encountered the same problem and I do not have JAAS on my classpath at all (unless it's there by default). Are there any other possible causes for this?

Cheers,
Steve

Jon Driscoll

unread,
Nov 22, 2001, 11:50:53 AM11/22/01
to
Hi Steve.

I was able to fix this problem by ensuring both my client and server were referencing the same weblogic.jar. I believe that the JAAS stuff is included in the weblogic.jar and that may be causing the problem..

Hope this helps
Jon D.

Michael Gris

unread,
Feb 14, 2002, 6:04:54 PM2/14/02
to

A note to all who read this thread:

I also had to remove Sun's j2ee (version 1.2) from my client's classpath before
the same problem went away. 1 programmer day down the drain....

Regards,

MG

0 new messages