tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan José García Lau <jgar...@cuscatlanguate.com>
Subject AccessControlException
Date Mon, 19 Apr 2004 20:47:55 GMT
Hi, I'm having problems to make jsp to work.  The code of the page call a
bean named myMoneda

d:/jakarta-tomcat-5.0.19/webapps/tarjetas/test.jsp

<%@page contentType="text/html"%>
<%@page errorPage="errorJSP.jsp"%>
<%@page import="Def.*"%>
<%@page import="Interfaz.*"%>

<jsp:useBean id="myMoneda" class="Def.monedaDef" scope="page"/>
<jsp:setProperty name="myMoneda" property="*"/>

<%
myMoneda.useData(1);
%>

When I use the method myMondeda.useData the tomcat gave me the
AccessControlException below.


I already added the AllPermission to the catalina.policy

grant codeBase "file:
d:/jakarta-tomcat-5.0.19/webapps/tarjetas/WEB-INF/classes/-" {
	permission java.security.AllPermission;
};


What can I do to solve my problem?

Thanks,

Juan


Error al crear el contexto...!! java.security.AccessControlException: access
den
ied (java.io.FilePermission
D:\jakarta-tomcat-5.0.19\webapps\tarjetas\WEB-INF\cl
asses\jndi.properties read)
Hubo un error al ejecutar el lookup en
capturaMoneda..!java.lang.NullPointerExce
ption
java.security.AccessControlException: access denied (java.io.FilePermission
D:\j
akarta-tomcat-5.0.19\webapps\tarjetas\WEB-INF\classes\org\apache\jasper\Jasp
erEx
ceptionBeanInfo.class read)
        at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
        at
java.security.AccessController.checkPermission(AccessController.java:
401)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
        at java.io.File.exists(File.java:678)
        at
org.apache.naming.resources.FileDirContext.file(FileDirContext.java:8
73)
        at
org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java
:255)
        at
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.ja
va:334)
        at
org.apache.catalina.loader.WebappClassLoader.findResourceInternal(Web
appClassLoader.java:1750)
        at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1618)
        at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:900)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1350)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1230)
        at java.beans.Introspector.instantiate(Introspector.java:1322)
        at
java.beans.Introspector.findExplicitBeanInfo(Introspector.java:393)
        at java.beans.Introspector.<init>(Introspector.java:342)
        at java.beans.Introspector.getBeanInfo(Introspector.java:144)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(Pro
pertyUtils.java:949)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(Pro
pertyUtils.java:979)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prop
ertyUtils.java:887)
        at
org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(Property
Utils.java:1172)
        at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(Property
Utils.java:772)
        at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.
java:801)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:298)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)

        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
        at java.lang.Thread.run(Thread.java:534)
java.security.AccessControlException: access denied (java.io.FilePermission
D:\j
akarta-tomcat-5.0.19\webapps\tarjetas\WEB-INF\classes\javax\servlet\ServletE
xcep
tionBeanInfo.class read)
        at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
        at
java.security.AccessController.checkPermission(AccessController.java:
401)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.SecurityManager.checkRead(SecurityManager.java:863)
        at java.io.File.exists(File.java:678)
        at
org.apache.naming.resources.FileDirContext.file(FileDirContext.java:8
73)
        at
org.apache.naming.resources.FileDirContext.lookup(FileDirContext.java
:255)
        at
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.ja
va:334)
        at
org.apache.catalina.loader.WebappClassLoader.findResourceInternal(Web
appClassLoader.java:1750)
        at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
ClassLoader.java:1618)
        at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
der.java:900)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1350)
        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
der.java:1230)
        at java.beans.Introspector.instantiate(Introspector.java:1322)
        at
java.beans.Introspector.findExplicitBeanInfo(Introspector.java:393)
        at java.beans.Introspector.<init>(Introspector.java:342)
        at java.beans.Introspector.getBeanInfo(Introspector.java:144)
        at java.beans.Introspector.getBeanInfo(Introspector.java:205)
        at java.beans.Introspector.<init>(Introspector.java:351)
        at java.beans.Introspector.getBeanInfo(Introspector.java:144)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(Pro
pertyUtils.java:949)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptors(Pro
pertyUtils.java:979)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prop
ertyUtils.java:887)
        at
org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(Property
Utils.java:1172)
        at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(Property
Utils.java:772)
        at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.
java:801)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:298)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)

        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
        at java.lang.Thread.run(Thread.java:534)
Apr 19, 2004 2:25:02 PM org.apache.coyote.tomcat5.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
proce
ssing
java.security.AccessControlException: access denied
(java.lang.RuntimePermission
 accessDeclaredMembers)
        at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
        at
java.security.AccessController.checkPermission(AccessController.java:
401)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at
java.lang.SecurityManager.checkMemberAccess(SecurityManager.java:1637
)
        at java.lang.Class.checkMemberAccess(Class.java:1435)
        at java.lang.Class.getDeclaredMethods(Class.java:1130)
        at
org.apache.commons.beanutils.MappedPropertyDescriptor$1.run(MappedPro
pertyDescriptor.java:386)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.apache.commons.beanutils.MappedPropertyDescriptor.getPublicDeclar
edMethods(MappedPropertyDescriptor.java:383)
        at
org.apache.commons.beanutils.MappedPropertyDescriptor.internalFindMet
hod(MappedPropertyDescriptor.java:453)
        at
org.apache.commons.beanutils.MappedPropertyDescriptor.findMethod(Mapp
edPropertyDescriptor.java:527)
        at
org.apache.commons.beanutils.MappedPropertyDescriptor.<init>(MappedPr
opertyDescriptor.java:149)
        at
org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(Prop
ertyUtils.java:907)
        at
org.apache.commons.beanutils.PropertyUtils.getSimpleProperty(Property
Utils.java:1172)
        at
org.apache.commons.beanutils.PropertyUtils.getNestedProperty(Property
Utils.java:772)
        at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.
java:801)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:298)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
        at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
        at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
        at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)

        at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
        at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
        at java.lang.Thread.run(Thread.java:534)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission
 setContextClassLoader)
        at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:269)
        at
java.security.AccessController.checkPermission(AccessController.java:
401)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
        at java.lang.Thread.setContextClassLoader(Thread.java:1212)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.p
rocessChildren(ContainerBase.java:1666)
        at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.r
un(ContainerBase.java:1651)
        at java.lang.Thread.run(Thread.java:534)

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message