Hi, I have only run the ServletTestRunner in Tomcat 4. However, from the message you're getting I would say that WebLogic default security (weblogic.policy) prevents calling System.setProperty() (it is called by the ServletTestRunner). So you simply need to modify weblogic.policy to enable it.
On another note, if you're using ServletTestRunner, then you do not need cactus.properties at all. Hope it helps, -Vincent > -----Original Message----- > From: Muhammad, Shakeel [IT] [mailto:[EMAIL PROTECTED]] > Sent: 30 July 2002 15:25 > To: '[EMAIL PROTECTED]' > Subject: Getting AccessControlException for contextURL > > Hi , > > I followed steps of 'Classpath Howto', 'Config Howto' to run > TestSampleServlet > test case. > http://localhost:8001/myapp/ServletTestRunner?suite=TestSampleServlet > But I am getting AccessControlException. I have appended properties file > as well as exception trail. > > Can someone help me out please. > > Thanks & Regards > -Shakeel > > > Cactus Version : 1.4b1 > ----------------------- > > App Server: WebLogic 5.1 > ----------------- > > cactus.properties File > ------------------------------- > > # Web app Context under which our application to test runs > cactus.contextURL = http://localhost:8001/myapp > > # Default Servlet Redirector Name. Used by ServletTestCase test cases. > cactus.servletRedirectorName = ServletRedirector > > # Default JSP Redirector Name. Used by JspTestCase test cases. > cactus.jspRedirectorName = JspRedirector > > cactus.filterRedirectorName = filterRedirector.jsp > > # Disable Cactus internal logging > cactus.enableLogging = false > > > Exception: > ---------------- > > Tue Jul 30 09:54:25 EDT 2002:<I> <WebAppServletContext-myapp> > ServletTestRunner: init > Tue Jul 30 09:54:27 EDT 2002:<E> <WebAppServletContext-myapp> Servlet > failed > with Exception > java.security.AccessControlException: access denied > (java.util.PropertyPermission cactus.contextURL write) > at java.lang.Throwable.fillInStackTrace(Native Method) > at java.lang.Throwable.fillInStackTrace(Compiled Code) > at java.lang.Throwable.<init>(Compiled Code) > at java.lang.Exception.<init>(Compiled Code) > at java.lang.RuntimeException.<init>(RuntimeException.java:47) > at java.lang.SecurityException.<init>(SecurityException.java:39) > at > java.security.AccessControlException.<init>(AccessControlException.java: 57 > ) > at java.security.AccessControlContext.checkPermission(Compiled > Code) > at java.security.AccessController.checkPermission(Compiled Code) > at java.lang.SecurityManager.checkPermission(Compiled Code) > at java.lang.System.setProperty(System.java:599) > at > org.apache.cactus.server.runner.ServletTestRunner.dispatch91_doGet(LogAs pe > ct > .java(1k):118) > at > org.apache.cactus.server.runner.ServletTestRunner.around91_doGet(LogAspe ct > .j > ava(1k):1156) > at > org.apache.cactus.server.runner.ServletTestRunner.doGet(LogAspect.java(1 k) > :1 > 01) > 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 > :120) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContex tI > mp > l.java:915) > at > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContex tI > mp > l.java:879) > at > weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletCon te > xt > Manager.java:269) > at > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:3 65 > ) > at > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:253) > at weblogic.kernel.ExecuteThread.run(Compiled Code) > > -- > To unsubscribe, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:cactus-user- > [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
