-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Pete,

On 10/30/2009 7:59 PM, Pete McNeil wrote:
> Fresh install of Tomcat6 on fresh install of ubuntu.

Be specific: exactly which version of Tomcat 6?

>      <Host name="someplace" appBase="/home/someplace/webapps"
>            unpackWARs="true" autoDeploy="true"
>            xmlValidation="false" xmlNamespaceAware="false">
>            <Context
>              path=""
>              docBase="/home/someplace/www.someplace.com"
>              reloadable="true"/>

NB: <Context> should be in a context.xml file on the disk, not in your
server.xml file.

>            <Alias>www.someplace.com</Alias>
>            <Alias>someplace.com</Alias>
>            <Alias>www.someplace.net</Alias>
>            <Alias>someplace.net</Alias>
> 
>            <Valve className="org.apache.catalina.valves.AccessLogValve"
>            prefix="someplace." suffix=".log"
>            pattern="common"/>
>      </Host>
> 
> 
> On the first access after a restart I get a security error.

First access after what? Tomcat restart? Webapp restart?

> SEVERE: Servlet.service() for servlet jsp threw exception
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessClassInPackage.org.apache.coyote)
>        at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:342)
> 
>        at
> java.security.AccessController.checkPermission(AccessController.java:553)
>        at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
>        at
> java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
>        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:291)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:316)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>        at
> org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1558)

That's interesting that this exception happens only once, given that
each time it should attempt to load the same class.

Given the exception, I suspect it's an incorrectly-configured
SecurityManager. I believe many Linux distros (including Ubuntu) ship
with SecurityManagers turned on be default, which means that you need to
configure it properly if your own code wants to do particular things.
But, in this case, it's Tomcat's code that has not been given access to
something.

Can you post the smallest of all the JSPs you can find that fails?

This is definitely strange.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrrizIACgkQ9CaO5/Lv0PA0YwCeNiSyI/f8W6gYuV3ZvC9MQBB6
25cAoKgOhNn9kCYCV/4rQuiDXBuQKJcj
=jZGd
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to