jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Error instantiating class
Date Sun, 10 Aug 2003 13:50:37 GMT
Hi Rose,

It seems your security.policy file does not allow cactus to write some
System property. The easiest is to do a grant all when performing tests.

Thanks
-Vincent

> -----Original Message-----
> From: Rose, Angus H [mailto:angus.rose@eds.com]
> Sent: 17 July 2003 16:42
> To: 'cactus-user@jakarta.apache.org'
> Subject: Error instantiating class
> 
> Hello All,
>               I've recently been given the task of unit testing an EJB
on
> Weblogic 5.1. I have followed the tutorials and how-to's on the
website.
> However, on running the TestCase I'm getting the following error
message
> from WLS:
> 
> [ERROR] AbstractWebTestCaller - -Error instantiating class
> [com.rose.angus.JUnitProject.JUnitBaseClass([testAnything], [null])]
>
<java.lang.reflect.InvocationTargetException>java.lang.reflect.Invocatio
nT
> ar
> getException: java.security.AccessControlException: access denied
> (java.util.PropertyPermission cactus.servletRedirectorName write)
>         at
>
java.security.AccessControlContext.checkPermission(AccessControlContext.
ja
> va
> :272)
>         at
>
java.security.AccessController.checkPermission(AccessController.java:399
)
>         at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
>         at java.lang.System.setProperty(System.java:641)
>         at
>
org.apache.cactus.configuration.BaseConfiguration.initialize(BaseConfigu
ra
> ti
> on.java:190)
>         at
>
org.apache.cactus.configuration.BaseConfiguration.<init>(BaseConfigurati
on
> .j
> ava:131)
>         at
>
org.apache.cactus.configuration.AbstractWebConfiguration.<init>(Abstract
We
> bC
> onfiguration.java;org/apache/cactus/util/log/LogAspect.aj[1k]:69)
>         at
>
org.apache.cactus.configuration.ServletConfiguration.<init>(ServletConfi
gu
> ra
> tion.java:70)
>         at
> org.apache.cactus.ServletTestCase.init(ServletTestCase.java:175)
>         at
> org.apache.cactus.ServletTestCase.<init>(ServletTestCase.java:151)
>         at
>
com.rose.angus.JUnitProject.JUnitBaseClass.<init>(JUnitBaseClass.java:45
)
>         at java.lang.reflect.Constructor.newInstance(Native Method)
>         at
>
org.apache.cactus.server.AbstractWebTestCaller.getTestClassInstance(Abst
ra
> ct
> WebTestCaller.java:413)
>         at
>
org.apache.cactus.server.AbstractWebTestCaller.doTest(AbstractWebTestCal
le
> r.
> java:150)
>         at
>
org.apache.cactus.server.AbstractWebTestController.dispatch133_handleReq
ue
> st
>
(AbstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj[
1k
> ]:
> 130)
>         at
>
org.apache.cactus.server.AbstractWebTestController.around133_handleReque
st
> (A
>
bstractWebTestController.java;org/apache/cactus/util/log/LogAspect.aj[1k
]:
> 11
> 58)
>         at
>
org.apache.cactus.server.AbstractWebTestController.handleRequest(Abstrac
tW
> eb
> TestController.java;org/apache/cactus/util/log/LogAspect.aj[1k]:101)
>         at
>
org.apache.cactus.server.ServletTestRedirector.dispatch160_doPost(Servle
tT
> es
> tRedirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:125)
>         at
>
org.apache.cactus.server.ServletTestRedirector.around160_doPost(ServletT
es
> tR
> edirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1158)
>         at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.
> java;org/apache/cactus/util/log/LogAspect.aj[1k]:109)
>         at
>
org.apache.cactus.server.ServletTestRedirector.dispatch159_doGet(Servlet
Te
> st
> Redirector.java;org/apache/cactus/util/log/LogAspect.aj[1k]:96)
>         at
>
org.apache.cactus.server.ServletTestRedirector.around159_doGet(ServletTe
st
> Re
> director.java;org/apache/cactus/util/log/LogAspect.aj[1k]:1158)
>         at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirect
or
> .j
> ava;org/apache/cactus/util/log/LogAspect.aj[1k]:92)
>         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
ja
> va
> :124)
>         at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContex
tI
> mp
> l.java:760)
>         at
>
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContex
tI
> mp
> l.java:707)
>         at
>
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletCon
te
> xt
> Manager.java:251)
>         at
>
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:3
69
> )
>         at
> weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:269)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
> 
> Has anybody come across this problem before, and if so how do I fix
it?
> 
> Angus Rose
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Mime
View raw message