Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

First Example of JAAS doesn't work.

843811Jan 31 2002 — edited Jan 31 2003

Hello,

I download jaas1_0.zip on sun.com.
I want to test it. So I make a batch file :

----------------------------------------------------------------------------------
@ECHO OFF
echo "Starting JAAS Example..."
C:\jdk1.3.1_02\jre\bin\java -classpath lib\jaas.jar;doc\samples\sample.jar;doc\samples\sample_action.jar;doc\samples\sample_module.jar -Djava.security.manager -Djava.security.policy==doc\samples\config\sample_java2.policy -Djava.security.auth.policy==doc\samples\config\sample_jaas.policy -Djava.security.auth.login.config==doc\samples\config\sample_jaas.config sample.Sample
----------------------------------------------------------------------------------

All the files used exist but here's the error I get :

----------------------------------------------------------------------------------
"Starting JAAS Example..."
Exception in thread "main" java.lang.ExceptionInInitializerError: java.security.
AccessControlException: access denied (java.util.PropertyPermission java.securit
y.auth.debug read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
78)
at java.lang.System.getProperty(System.java:560)
at javax.security.auth.login.Debug$1.run(Debug.java:27)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.Debug.<clinit>(Debug.java:24)
at javax.security.auth.login.LoginContext.<clinit>(LoginContext.java:147
)
at sample.Sample.main(Sample.java:41)
----------------------------------------------------------------------------------

I don't understand I haven't modify anything in the files.
Is there anyone who knows where it is from ?

Thank you for your help.
Yann

---
JOnAS : http://www.objectweb.org/jonas/index.html
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 28 2003
Added on Jan 31 2002
6 comments
234 views