Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

What's wrong with this policy file???

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When i try to run a JAAS programe. it tell me a error with policy file. I wanna know what's wrong with this file.
Exception:
ava.security.Policy: error parsing file:E:/IDE_PROJECTS/JBUILDER7/learningJce/src/jaas.policy
java.security.Policy: line 8: expected codeBase or SignedBy
java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.util.PropertyPermission java.security.auth.debug read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.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:1278)
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 learningjaas.JAASExample.main(JAASExample.java:30)
Exception in thread "main"
Policy file:
grant codeBase "file:E:/IDE_PROJECTS/JBUILDER7/learningJce/classes/*" ,
Principal learningjaas.PrincipalImpl "Brad" {
permission PersonnelPermission "access";
};

grant {
permission javax.security.auth.AuthPermission "createLoginContext";
permission javax.security.auth.AuthPermission "doAs";
permission javax.security.auth.AuthPermission "doAsPrivileged";
permission javax.security.auth.AuthPermission "modifyPrincipals";
permission javax.security.auth.AuthPermission "getSubject";
java.util.PropertyPermission "read";
java.security.auth.debug "read";
};
 
Javan Li
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i got it. Thanx anyway!
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,
Could you tell me how You have solved this Problem?
 
My cellmate was this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic