Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
    org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:294)
    org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

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!

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
add comment

You could disable the security manager for Tomcat as whole.

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

TOMCAT6_SECURITY=no

(Make sure the line is uncommented)

Be sure you understand the implications of doing this though.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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