Forum Stats

  • 3,853,732 Users
  • 2,264,259 Discussions
  • 7,905,436 Comments

Discussions

Problems with JAAS sample

843811
843811 Member Posts: 49,851 Green Ribbon
Dear All

I am trying to run sample application that accomanies JAAS. I am getting following exception -

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)

Please let me know if I am missing anything. Any help is appreciated

regards,
- Venu

Comments

  • 843811
    843811 Member Posts: 49,851 Green Ribbon
    I have resolved this problem. THe problem was in Policy file. The [path] tag that was supposed to hv been replaced with the actual path, needs to use Forward slashes "/" instead of OS specific since it is URL. Once I changed path to using forward slashes, it works fine. I wish the exception thrown could have been more meaningful like could not Locate Policy file or something in relevant to actual problem.

    Hope this helps

    regards
    - Venu
  • 843811
    843811 Member Posts: 49,851 Green Ribbon
    You may also want to check out the code samples at

    http://www.esus.com/javaindex/j2se/jdk1.2/javasecurity/jaas/jaas.html

    Cheers,
    Joris
  • 843811
    843811 Member Posts: 49,851 Green Ribbon
    Anybody can show me how do we do the jaas authentication under the context of client-server structure?
    Thanks a lot!

    Burt

    Dear All

    I am trying to run sample application that accomanies
    JAAS. I am getting following exception -

    Exception in thread "main"
    java.lang.ExceptionInInitializerError: java.security.
    AccessControlException: access denied
    (java.util.PropertyPermission java.securit
    y.auth.debug read)
    at
    at
    at
    t
    java.security.AccessControlContext.checkPermission(Acce
    sControlConte
    xt.java:272)
    at
    at
    at
    t
    java.security.AccessController.checkPermission(AccessCo
    troller.java:
    399)
    at
    at
    at
    t
    java.lang.SecurityManager.checkPermission(SecurityManag
    r.java:545)
    at
    at
    at
    t
    java.lang.SecurityManager.checkPropertyAccess(SecurityM
    nager.java:12
    78)
    at
    at java.lang.System.getProperty(System.java:560)
    at
    at
    at
    t
    javax.security.auth.login.Debug$1.run(Debug.java:27)
    at
    at
    at
    t java.security.AccessController.doPrivileged(Native
    Method)
    at
    at
    at
    t
    javax.security.auth.login.Debug.<clinit>(Debug.java:24)

    at
    at
    at
    t
    javax.security.auth.login.LoginContext.<clinit>(LoginCo
    text.java:147
    )
    at sample.Sample.main(Sample.java:41)

    Please let me know if I am missing anything. Any help
    is appreciated

    regards,
    - Venu
This discussion has been closed.