users@glassfish.java.net

doAsPrivileged AuthPermission required to set SecurityContext

From: <glassfish_at_javadesktop.org>
Date: Thu, 09 Apr 2009 03:50:49 PDT

Hi,

sometimes I got this following error.

Any idea what is wrong? How I can prevent this? This seams to be a GlassFish internal failure. After restarting GlassFish all is right...

[code][#|2009-03-17T16:01:52.098+0100|INFO|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=51;_ThreadName=httpSSLWorkerThread-8080-3;|JACC Policy Provider: PolicyWrapper.implies, context(my-ear-0.9.0.1b/admin-war-0.0.3_war)- permission((javax.security.auth.AuthPermission doAsPrivileged)) domain that failed(ProtectionDomain (file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/some-jar-0.0.7-SNAPSHOT_jar/ <no signer certificates>)
 EJBClassLoader :
doneCalled = true
doneSnapshot = EJBClassLoader.done() called ON EJBClassLoader :
urlSet = [URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/lib/centerware-1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/lib/config-0.9.0.1-SNAPSHOT.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/lib/log4j-1.2.15.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/activation-1.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/jms-1.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/jmxri-1.2.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/jmxtools-1.2.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/mail-1.4.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/activation.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-jar-1.0.0_jar/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/classes/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/commons-beanutils-1.7.0.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/commons-collections-3.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/commons-lang-2.3.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/commons-logging-1.0.4.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/displaytag-1.1.1.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/freemarker-2.3.8.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/itext-1.3.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/jcl104-over-slf4j-1.4.2.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/ognl-2.6.11.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/slf4j-api-1.4.2.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/slf4j-log4j12-1.4.2.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/struts2-core-2.0.11.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/um-war-1.0.1_war/WEB-INF/lib/xwork-2.0.4.jar, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/war-0.0.2_war/WEB-INF/classes/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/my-jar-0.9.0.1-SNAPSHOT_jar/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/admin-war-0.0.3_war/WEB-INF/classes/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/applications/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/some-jar-0.0.7-SNAPSHOT_jar/, URLEntry : file:/D:/apps/glassfish/domains/my-domain/generated/ejb/j2ee-apps/my-ear-0.9.0.1-SNAPSHOT/]
doneCalled = false
 Parent -> EJBClassLoader :
urlSet = []
doneCalled = false
 Parent -> java.net.URLClassLoader_at_dc1f04


 AT Fri Mar 13 17:49:09 CET 2009
 BY :com.sun.enterprise.loader.EJBClassLoader.printStackTraceToString(EJBClassLoader.java:816)
com.sun.enterprise.loader.EJBClassLoader.done(EJBClassLoader.java:173)
com.sun.enterprise.server.AbstractLoader.done(AbstractLoader.java:359)
com.sun.enterprise.server.ApplicationLoader.unload(ApplicationLoader.java:264)
com.sun.enterprise.server.TomcatApplicationLoader.unload(TomcatApplicationLoader.java:213)
com.sun.enterprise.server.ApplicationManager.applicationUndeployed(ApplicationManager.java:525)
com.sun.enterprise.server.ApplicationManager.applicationUndeployed(ApplicationManager.java:699)
com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:930)
com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:912)
com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:461)
com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:176)
com.sun.enterprise.admin.server.core.DeploymentNotificationHelper.multicastEvent(DeploymentNotificationHelper.java:308)
com.sun.enterprise.deployment.phasing.DeploymentServiceUtils.multicastEvent(DeploymentServiceUtils.java:226)
com.sun.enterprise.deployment.phasing.ServerDeploymentTarget.sendStopEvent(ServerDeploymentTarget.java:332)
com.sun.enterprise.deployment.phasing.ApplicationStopPhase.runPhase(ApplicationStopPhase.java:136)
com.sun.enterprise.deployment.phasing.DeploymentPhase.executePhase(DeploymentPhase.java:108)
com.sun.enterprise.deployment.phasing.PEDeploymentService.executePhases(PEDeploymentService.java:919)
com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:652)
com.sun.enterprise.deployment.phasing.PEDeploymentService.stop(PEDeploymentService.java:699)
com.sun.enterprise.admin.mbeans.ApplicationsConfigMBean.stop(ApplicationsConfigMBean.java:767)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:375)
com.sun.enterprise.admin.MBeanHelper.invokeOperationInBean(MBeanHelper.java:358)
com.sun.enterprise.admin.config.BaseConfigMBean.invoke(BaseConfigMBean.java:464)
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:836)
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:761)
sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:90)
$Proxy1.invoke(Unknown Source)
com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.invoke(SunoneInterceptor.java:304)
com.sun.enterprise.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:174)
com.sun.enterprise.deployment.client.DeploymentClientUtils.stopApplication(DeploymentClientUtils.java:121)
com.sun.enterprise.deployment.client.UndeployAction.run(UndeployAction.java:148)
java.lang.Thread.run(Thread.java:619)
 Parent -> EJBClassLoader :
urlSet = []
doneCalled = false
 Parent -> java.net.URLClassLoader_at_dc1f04


 <no principals>
 java.security.Permissions_at_cd1562 (
 (javax.management.MBeanPermission [com.sun.messaging.jms.*:*] *)
 (java.lang.RuntimePermission getClassLoader)
 (java.lang.RuntimePermission loadLibrary.*)
 (java.lang.RuntimePermission accessDeclaredMembers)
 (java.lang.RuntimePermission getProtectionDomain)
 (java.lang.RuntimePermission modifyThreadGroup)
 (java.lang.RuntimePermission stopThread)
 (java.lang.RuntimePermission setContextClassLoader)
 (java.lang.RuntimePermission queuePrintJob)
 (javax.management.MBeanTrustPermission register)
 (java.util.PropertyPermission line.separator read)
 (java.util.PropertyPermission java.vm.version read)
 (java.util.PropertyPermission java.vm.specification.version read)
 (java.util.PropertyPermission java.vm.specification.vendor read)
 (java.util.PropertyPermission java.vendor.url read)
 (java.util.PropertyPermission java.vm.name read)
 (java.util.PropertyPermission * read,write)
 (java.util.PropertyPermission os.name read)
 (java.util.PropertyPermission java.vm.vendor read)
 (java.util.PropertyPermission path.separator read)
 (java.util.PropertyPermission java.specification.name read)
 (java.util.PropertyPermission os.version read)
 (java.util.PropertyPermission os.arch read)
 (java.util.PropertyPermission java.class.version read)
 (java.util.PropertyPermission java.version read)
 (java.util.PropertyPermission file.separator read)
 (java.util.PropertyPermission java.vendor read)
 (java.util.PropertyPermission java.vm.specification.name read)
 (java.util.PropertyPermission java.specification.version read)
 (java.util.PropertyPermission java.specification.vendor read)
 (javax.security.auth.PrivateCredentialPermission javax.resource.spi.security.PasswordCredential * "*" read)
 (unresolved javax.security.jacc.WebUserDataPermission /messages/* null)
 (unresolved javax.security.jacc.WebUserDataPermission /index.jsf null)
 (unresolved javax.security.jacc.WebUserDataPermission /:/messages/*:/index.jsf null)
 (unresolved com.sun.corba.ee.impl.presentation.rmi.DynamicAccessPermission access null)
 (unresolved javax.security.jacc.WebResourcePermission /messages/* !GET,POST)
 (unresolved javax.security.jacc.WebResourcePermission /:/messages/*:/index.jsf null)
 (unresolved javax.security.jacc.WebResourcePermission /index.jsf !GET,POST)
 (unresolved com.sun.enterprise.security.CORBAObjectPermission * *)
 (unresolved ognl.OgnlInvokePermission * null)
 (java.io.FilePermission D:\apps\Server\Working\- delete)
 (java.io.FilePermission D:\apps\Server\Documents\- delete)
 (java.io.FilePermission C:\WINDOWS\TEMP\\- delete)
 (java.io.FilePermission D:/apps/glassfish/domains/my-domain\lib\databases\- delete)
 (java.io.FilePermission <<ALL FILES>> read,write)
 (java.net.SocketPermission localhost:1024- listen,resolve)
 (java.net.SocketPermission * connect,resolve)
 (java.lang.reflect.ReflectPermission suppressAccessChecks)
)

)|#]

[#|2009-03-17T16:01:52.098+0100|SEVERE|sun-appserver9.1|javax.enterprise.system.core.security|_ThreadID=51;_ThreadName=httpSSLWorkerThread-8080-3;_RequestID=1b0ef5b2-f348-4c13-9c7d-47f7506c3777;|SEC5048: doAsPrivileged AuthPermission required to set SecurityContext.
java.security.AccessControlException: access denied (javax.security.auth.AuthPermission doAsPrivileged)
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
        at java.security.AccessController.checkPermission(AccessController.java:546)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        at com.sun.enterprise.security.SecurityContext.setCurrent(SecurityContext.java:324)
        at com.sun.web.security.WebSecurityManager.hasResourcePermission(WebSecurityManager.java:416)
        at com.sun.web.security.RealmAdapter.invokeWebSecurityManager(RealmAdapter.java:788)
        at com.sun.web.security.RealmAdapter.preAuthenticateCheck(RealmAdapter.java:1053)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:617)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:609)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
        at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:547)
        at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:299)
        at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
        at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
        at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
        at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
|#]
[/code]

Thanks a lot...
[Message sent by forum member 'hegalor' (hegalor)]

http://forums.java.net/jive/thread.jspa?messageID=341336