jaas: unable to instantiate Subject-based policy

Hi I'm trying to use JAAS 1.0

In order to check if JAAS is active/working

I try to get it's policy:

javax.security.auth.Policy.getPolicy()

But I get the following exception:

java.lang.SecurityException: unable to instantiate Subject-based policy

at javax.security.auth.Policy.getPolicyNoCheck(Policy.java:241)

at javax.security.auth.Policy.getPolicy(Policy.java:198)

Side note: Just to make it not to easy this is in a jsp in Tomcat 3.2.3

Anybody an idea what I can do about it.

A real tutorial for this stuff would be awesome ... explaining the things that can go wrong ...

Spieler

PS: Just like almost everybody else I can't get the Sample program to fly ... same Property read problem

sh****

[796 byte] By [spieler] at [2007-9-26 3:05:46]
# 1

Did you make this work. I am having the same problem both from a Servlet and from a Java Swing application.

Thanks in advance.

java.lang.SecurityException: unable to instantiate Subject-based policy

at javax.security.auth.Policy.getPolicyNoCheck(Policy.java:222)

at javax.security.auth.Policy.getPolicy(Policy.java:179)

at javax.security.auth.SubjectDomainCombiner$2.run(SubjectDomainCombiner.java:180)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.SubjectDomainCombiner.combine(SubjectDomainCombiner.java:176)

at java.security.AccessControlContext.goCombiner(AccessControlContext.java:387)

at java.security.AccessControlContext.optimize(AccessControlContext.java:311)

at java.security.AccessController.checkPermission(AccessController.java:400)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)

at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1291)

at java.lang.System.getProperty(System.java:611)

at com.mahesh.research.jaas.app.FactoryLayerListWindow.run(FactoryLayerListWindow.java:52)

at java.security.AccessController.doPrivileged(Native Method)

at javax.security.auth.Subject.doAs(Subject.java:319)

at com.mahesh.research.jaas.app.LoginTest.TestLogin(LoginTest.java:121)

at com.mahesh.research.jaas.app.LoginTest.main(LoginTest.java:50)

mahesh_anandan at 2007-6-29 11:07:54 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 2
Don't bother, I Solved this one.
mahesh_anandan at 2007-6-29 11:07:54 > top of Java-index,Security,Other Security APIs, Tools, and Issues...
# 3
If you solved the problem, can you post the solution here? Because I need the solution....tq
rockcacing at 2007-6-29 11:07:54 > top of Java-index,Security,Other Security APIs, Tools, and Issues...