I am running clean install of Ubuntu Server 9.10 with Tomcat 6 installed from the Ubuntu installation. When I upload a WebApp through the Tomcat Manager and it starts automatically on boot with /etc/init.d/tomcat6 start my Lib Jars in my Web Apps WebContent/WEB-INF/lib throw an exception.

I am using Project ROME for my RSS Feed which works fine on my local tomcat server I test on through Eclipse. However, when I run it on the Ubuntu Tomcat I get a ServletException:

javax.servlet.ServletException: Could not initialize class com.sun.syndication.feed.synd.SyndFeedImpl

I am guessing I need to change one of the files in /etc/tomcat6/policy.d/ which generates the /var/cache/tomcat6/catalina.policy file. But I don't know what to change. Help please!


Okay, I got something that works.

I edited the /etc/tomcat6/policy.d/01system.policy and added at the bottom:

// Grant WebApps All Permission
grant codeBase "file:/var/lib/tomcat6/webapps/-" {
    permission java.security.AllPermission;

This works now, but not sure if its the right thing to do.


You could disable the security manager for Tomcat as whole.

Edit /etc/default/tomcat6 and set TOMCAT6_SECURITY to no.


(Make sure the line is uncommented)

Be sure you understand the implications of doing this though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.