views:

456

answers:

2

Hi sometimes i encoutner this error after restarsting sun application server 8.2 domain anyone have any idea what could be the reason?

javax.servlet.ServletException at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:255) at javax.servlet.http.HttpServlet.service(HttpServlet.java:860) at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Subject.java:517) at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257) at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55) at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:484) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417) at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80) at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95) at java.security.AccessController.doPrivileged(Native Method) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:448) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:339) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:282) at org.apache.catalina.core.StandardHostValve.postInvoke(StandardHostValve.java:184) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:552) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:189) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doProcess(ProcessorTask.java:604) at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:475) at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:371) at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:264) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:281) at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:83)----- Root Cause -----java.lang.StackOverflowError 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) at javax.security.auth.SubjectDomainCombiner.combineJavaxPolicy(SubjectDomainCombiner.java:366) at javax.security.auth.SubjectDomainCombiner.combine(SubjectDomainCombiner.java:191)

… ad inifinitum

+3  A: 

Infinite recursion.

This is evident by your long, repeating backtrace. The fact that you receive a stack overflow error also supports this.

strager
+1  A: 

My guess is something with your security policy is triggering an infinitely recursive operation. Though there does not appear to be any application code involved, so it's hard to say for sure. Is the repeating section always bounded between calls to SubjectDomainCombiner?

One thing you can do you confirm it's truly an infinitely recursive problem is to increase the stack size. You should see the looping section expand to fill the remainder of the space when it does crash. Otherwise, you're just running low on stack... it does happen, especially when you've already got 30 or 40 frames on the stack from the application server framework itself.

The default stack size is 256k.

You can increase it by applying the JVM argument, for example -Xss2M to get 2MB of stack.

Do this just to confirm the problem, not as a permanent solution.

Mark Renouf