You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Lenz <br...@infopop.com> on 2001/07/09 23:08:56 UTC

AccessControlException in Tomcat

Hello,

I am running Tomcat 3.3 milestone 4 as an out-of-process servlet container
along with Apache Web Server.  When I start up Tomcat, my application
initializes correctly.  Additionally, I can successfully make requests to
the application through the web server.

However, before each request is fulfilled, Tomcat throws an
AccessControlException.  The exception states that access is denied to one
of the included libraries (jar).  The error is a java.io.FilePermission
error.  Each time that this particular library is referenced, Tomcat throws
this exception and the application fails to handle the request.  I can run
this identical application through Apache JServ and avoid this error, but I
would like to get it up and running in Tomcat as well.  Does anyone have any
idea why a file access error might be happening in Tomcat?  I've checked all
of the necessary file permissions, and they are all set up correctly.  Is it
possible that Tomcat has tried to open the file twice and caused a file read
exception on its own?  I have included the stack trace below for reference.
Also, I tried running the application in Tomcat 3.2.2 and ran into the same
problem.

I would appreciate any help anyone can give to me!

Thanks!

Brian

java.security.AccessControlException: access denied (java.io.FilePermission
C:\w
ork\tomcat\webapps\ip\WEB-INF\lib\PerlTools.jar read)' at
java.security.AccessControlException: access denied (java.io.FilePermission
C:\w
ork\tomcat\webapps\ip\WEB-INF\lib\PerlTools.jar read)
        at
java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:279)
        at
java.security.AccessController.checkPermission(AccessController.java:
405)
        at
java.lang.SecurityManager.checkPermission(SecurityManager.java:551)
        at java.net.URLClassLoader$4.run(URLClassLoader.java:468)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.getPermissions(URLClassLoader.java:466)
        at
java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader
.java:168)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
7)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
        at java.net.URLClassLoader.access$300(URLClassLoader.java:69)
        at
java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled
Code))
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled
Code))

        at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
        at
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java(Compiled
 Code))
        at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
...