Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tomcat 5 catalina.policy problem

Status
Not open for further replies.

jpsm

Technical User
Aug 25, 2006
3
PT
I am using some classes that need to be able to call java.lang.Thread.setContextClassLoader in a web-application.
<p>
To that end I added<br>

grant codeBase "file:${catalina.home}/webapps/AppX/-"{<br>
permission java.lang.RuntimePermission "setContextClassLoader";<br>
}
<br>
to my catalina.policy file
<p>
But the problem persistis, can anyone help? What is missing?

Exception in thread "ContainerBackgroundProcessor[StandardEngine[Catalina]]" jav
a.security.AccessControlException: access denied (java.lang.RuntimePermission se
tContextClassLoader)
 
I'm no expert in java.policy files (or their counterparts), but in the 5 years I've worked with tomcat, I've never had AccessControlExpceptions like that.

So ...

#1 : Have you toded with the default java.policy file for your JVM ?
#2 : Have you tried just using the deafult catalina policy ?


--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Thanks for the reply,

#1: No, I did not altered the java.policy defaults.

#2: Yes, I did try to use catalina.policy defaults.

I need to use jini lookup features from a web application... It is not a common requirement...
 
Found the problem.

I must start Tomcat With A SecurityManager.


%CATALINA_HOME%\bin\catalina start -security
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top