tags:

views:

201

answers:

0

I encounter this error after deployment of the java web application (.war). If i remove the server.policy file. I will not encounter this error however it means that there will be no security. I realize that the error will occur if i include the following in server.policy which by default is included permission java.lang.RuntimePermission "modifyThreadGroup";

If inside the server.policy file i just remove this permission java.lang.RuntimePermission "modifyThreadGroup";

I will get access denied as by default the security manager will check for this permission

Anyone have any idea what is wrong and how do i resolve this?

[#|2009-01-22T12:33:18.229+0800|SEVERE|sun-appserver-ee8.1_02|javax.enterprise.system.container.web|_ThreadID=12;|StandardWrapperValve[default]: Servlet.service() for servlet default threw exception

java.lang.StackOverflowError

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

  at com.sun.security.auth.SubjectCodeSource.<init>(SubjectCodeSource.java:71)

  at com.sun.security.auth.PolicyFile$2.run(PolicyFile.java:821)

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

  at com.sun.security.auth.PolicyFile.getPermissions(PolicyFile.java:818)

  at javax.security.auth.SubjectDomainCombiner$3.run(SubjectDomainCombiner.java:357)

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

  at javax.security.auth.SubjectDomainCombiner.combineJavaxPolicy(SubjectDomainCombiner.java:353)

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

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

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

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

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

  at java.security.Security.getProperty(Security.java:724)

  at com.sun.security.auth.PolicyFile.initPolicyFile(PolicyFile.java:356)

  at com.sun.security.auth.PolicyFile.init(PolicyFile.java:269)

  at com.sun.security.auth.PolicyFile.getPermissions(PolicyFile.java:869)

  at com.sun.security.auth.PolicyPermissions.init(PolicyFile.java:1416)

  at com.sun.security.auth.PolicyPermissions.elements(PolicyFile.java:1429)