dev@glassfish.java.net

security problem access denied

From: Siddharth Paralikar <s.paralikar_at_ncl.res.in>
Date: Tue, 21 Feb 2006 13:51:19 +0530

I am trying to deploy my application WAR which is made using JSF, Spring
and Hibernate. which is running in tomcat 5.5.9.
Now it is giving following error. whether Spring and hibernate support
is not there or is there any security settings i have to enable.

I will try to make this application later with JSF and EJB3.

thanks

Siddharth

*type* Exception report

*message*

*description* _The server encountered an internal error () that
prevented it from fulfilling this request._

*exception*

javax.servlet.ServletException: access denied (java.lang.RuntimePermission getProtectionDomain)
        javax.faces.webapp.FacesServlet.service(Unknown Source)
        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:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:262)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:295)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:178)
        com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:666)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:573)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:843)
        com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)

*root cause*

java.security.AccessControlException: access denied (java.lang.RuntimePermission getProtectionDomain)
        java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
        java.security.AccessController.checkPermission(AccessController.java:427)
        java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
        java.lang.Class.getProtectionDomain(Class.java:2074)
        net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:42)
        java.security.AccessController.doPrivileged(Native Method)
        net.sf.cglib.core.ReflectUtils.(ReflectUtils.java:40)
        net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
        net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:215)
        net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
        net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
        net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
        net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
        org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:321)
        org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
        org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:758)
        org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:685)
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:937)
        org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334)
        org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222)
        org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146)
        org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:271)
        org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310)
        org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
        org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230)
        org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156)
        org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:81)
        javax.servlet.GenericServlet.init(GenericServlet.java:245)
        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:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:262)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:295)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:178)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:131)
        com.sun.enterprise.web.WebModule.start(WebModule.java:292)
        java.security.AccessController.doPrivileged(Native Method)
        com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1452)
        com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1124)
        com.sun.enterprise.server.WebModuleDeployEventListener.moduleDeployed(WebModuleDeployEventListener.java:171)
        com.sun.enterprise.server.WebModuleDeployEventListener.moduleRedeployed(WebModuleDeployEventListener.java:343)
        com.sun.enterprise.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:958)
        com.sun.enterprise.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:941)
        com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:448)
        com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:160)
        com.sun.enterprise.admin.event.PEEventDispatcher.dispatch(PEEventDispatcher.java:45)
        com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:185)
        com.sun.enterprise.admin.server.core.AdminNotificationHelper.sendNotification(AdminNotificationHelper.java:128)
        com.sun.enterprise.admin.server.core.ConfigInterceptor.postInvoke(ConfigInterceptor.java:109)
        com.sun.enterprise.admin.util.proxy.ProxyClass.invoke(ProxyClass.java:97)
        $Proxy1.setAttributes(Unknown Source)
        com.sun.enterprise.admin.server.core.jmx.SunoneInterceptor.setAttributes(SunoneInterceptor.java:343)
        com.sun.enterprise.tools.admingui.util.MBeanUtil.setAttributes(MBeanUtil.java:133)
        com.sun.enterprise.tools.admingui.handlers.MBeanHandlers.setAttributeListToMBean(MBeanHandlers.java:158)
        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:585)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandler(DescriptorViewHelper.java:886)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandlers(DescriptorViewHelper.java:823)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandler(DescriptorViewHelper.java:863)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.invokeHandlers(DescriptorViewHelper.java:823)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.dispatchEvent(DescriptorViewHelper.java:798)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewHelper.execute(DescriptorViewHelper.java:309)
        com.sun.enterprise.tools.guiframework.view.DescriptorViewBeanBase.execute(DescriptorViewBeanBase.java:210)
        com.iplanet.jato.view.RequestHandlingViewBase.handleRequest(RequestHandlingViewBase.java:308)
        com.iplanet.jato.view.ViewBeanBase.dispatchInvocation(ViewBeanBase.java:802)
        com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:740)
        com.iplanet.jato.view.ViewBeanBase.invokeRequestHandlerInternal(ViewBeanBase.java:760)
        com.iplanet.jato.view.ViewBeanBase.invokeRequestHandler(ViewBeanBase.java:571)
        com.iplanet.jato.ApplicationServletBase.dispatchRequest(ApplicationServletBase.java:957)
        com.iplanet.jato.ApplicationServletBase.processRequest(ApplicationServletBase.java:615)
        com.sun.enterprise.tools.guiframework.view.BaseServlet.processRequest(BaseServlet.java:205)
        com.iplanet.jato.ApplicationServletBase.doPost(ApplicationServletBase.java:473)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:822)
        sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        java.lang.reflect.Method.invoke(Method.java:585)
        org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:262)
        java.security.AccessController.doPrivileged(Native Method)
        javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
        org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:295)
        org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:178)
        com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
        com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
        org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:223)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:666)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:573)
        com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:843)
        com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
        com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
        com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
        com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)

*note* _The full stack trace of the root cause is available in the Sun
Java System Application Server Platform Edition 9.0 RC logs._

------------------------------------------------------------------------