jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jair da Silva Ferreira Jr ...@amazon.com.br>
Subject System.setProperty(..) and SecurityException
Date Tue, 16 Nov 2004 13:31:06 GMT
Hi,
    My production environment does not allow the System.setProperty(...) 
call and throws a SecurityException. Cactus 1.6.1 uses this method 
internally even though I provide a cactus.properties in the servlet 
container environment classpath (I put the cactus.properties file in 
WEB-INF/classes), so the SecurityException is always thrown.
    How can I solve this problem? Any help would be much appreciated.
    Below are my cactus.properties file and the exception stack trace.

Thanks,
    Jair Jr

=============
cactus.properties
=============
# Configuration file for Cactus.

# Each project using Cactus need to have such a file put in the CLASSPATH
# (Meaning the directory containgin this file should be in the 
CLASSPATH, not
# the file itself of course ... :) )

# Defines the URLs that will be used by Cactus to call it's redirectors
#(Servlet and JSP). You need to specify in these URLs the webapp context
# that you use for your application. In the example below, the context is
# "test".

cactus.servletRedirectorURL = 
http://www.dvdfilme.com.br/teste/ServletRedirector
#cactus.jspRedirectorURL = http://www.dvdfilme.com.br/teste/JspRedirector 

===============
Exception stack trace
===============
java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:308)
    at java.lang.Class.newInstance(Class.java:261)
    at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:987)
    at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    at LocaWebValve.invoke(LocaWebValve.java:101)
    at 
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    at 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:300)
    at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:374)
    at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:743)
    at 
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:675)
    at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
    at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    at java.lang.Thread.run(Thread.java:534)
Caused by: java.security.AccessControlException: access denied 
(java.util.PropertyPermission cactus.servletRedirectorURL write)
    at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
    at 
java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
    at java.lang.System.setProperty(System.java:654)
    at 
org.apache.cactus.internal.configuration.ConfigurationInitializer.addSystemProperties(ConfigurationInitializer.java:170)
    at 
org.apache.cactus.internal.configuration.ConfigurationInitializer.initializeConfig(ConfigurationInitializer.java:125)
    at 
org.apache.cactus.internal.configuration.ConfigurationInitializer.initialize(ConfigurationInitializer.java:73)
    at 
org.apache.cactus.server.runner.ServletTestRunner.<clinit>(ServletTestRunner.java:68)
    ... 36 more


Mime
View raw message