Hi Jair,

Yes, this is a known issue. The solution is to change your security.policy
file for your container. Do not change the production version of it but just
change the one you use for testing.

We have an open issue on this but nobody is working on this right now so the
best for you is probably to update your security.policy file for now.

Thanks and sorry for the inconvenience
-Vincent

> -----Original Message-----
> From: Jair da Silva Ferreira Jr [mailto:[EMAIL PROTECTED]
> Sent: mardi 16 novembre 2004 14:31
> To: [EMAIL PROTECTED]
> Subject: System.setProperty(..) and SecurityException
> 
> 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(NativeConstructorAcc
> essorImpl.java:39)
>     at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstr
> uctorAccessorImpl.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(StandardValveCont
> ext.java:104)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
>     at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardConte
> xtValve.java:198)
>     at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.
> java:144)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
>     at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBa
> se.java:462)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:102)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
>     at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:1
> 37)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
>     at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:1
> 18)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:102)
>     at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520
> )
>     at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.ja
> va:109)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.java:104)
>     at LocaWebValve.invoke(LocaWebValve.java:101)
>     at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCont
> ext.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:67
> 5)
>     at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
>     at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.j
> ava: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.ja
> va: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.addSyste
> mProperties(ConfigurationInitializer.java:170)
>     at
> org.apache.cactus.internal.configuration.ConfigurationInitializer.initiali
> zeConfig(ConfigurationInitializer.java:125)
>     at
> org.apache.cactus.internal.configuration.ConfigurationInitializer.initiali
> ze(ConfigurationInitializer.java:73)
>     at
> org.apache.cactus.server.runner.ServletTestRunner.<clinit>(ServletTestRunn
> er.java:68)
>     ... 36 more
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to