tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Baert <michele.ba...@free.fr>
Subject Re: I still cannot run a basic struts2 app on tomcat55
Date Tue, 24 Jul 2007 07:52:28 GMT
Le lundi 23 juillet 2007 à 17:04 +0200, Phi-Long LE a écrit :
> try to comment this within catalina.policy:
> 
> grant codeBase "file:${catalina.home}/webapps/-" {
>   permission java.security.AllPermission;
> };

  My /var/lib/tomcat5.5/conf/catalina.policy is autogenerated,
but I can modify are the files in /etc/tomcat5.5/policy.d/.
After restarting tomcat, they end up in catalina.policy.

  I had already tried what you suggest, but I discovered maybe a hint :
in /etc/tomcat5.5/policy.d/10admin.policy ,there was:

grant codeBase "file:/usr/share/struts1.2/struts.jar" {
    permission java.security.AllPermission;
};

  So my install would be preconfigured to use version 1.2 of struts,
but not struts2 . So I added

grant codeBase
"file:/var/lib/tomcat5.5/shared/lib/struts2-core-2.0.8.jar" {
   permission java.security.AllPermission;
};

  And also :

grant codeBase "file:/var/lib/tomcat5.5/shared/lib/-" {
  permission java.security.AllPermission;
};

But I still get in my localhost.log, after trying to to
start /struts2-blank-2.0.8:

24 juil. 2007 09:24:26 org.apache.catalina.core.StandardContext
filterStart
SEVERE: Exception au démarrage du filtre struts2
Caught exception while loading file struts-default.xml - Class:
java.security.AccessControlContext
File: AccessControlContext.java
Method: checkPermission
Line: 264 - java/security/AccessControlContext.java:264:-1
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:839)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
	at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
	at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
	at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
	at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
	at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
	at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
	at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
	at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3634)
	at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4217)
	at
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1175)
	at
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:527)
	at
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.catalina.security.SecurityUtil
$1.run(SecurityUtil.java:243)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
	at
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:275)
	at
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:161)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:245)
	at org.apache.catalina.core.ApplicationFilterChain.access
$0(ApplicationFilterChain.java:177)
	at org.apache.catalina.core.ApplicationFilterChain
$1.run(ApplicationFilterChain.java:156)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:152)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.security.AccessControlException: access denied
(java.io.FilePermission
file:/var/lib/tomcat5.5/webapps/struts2-blank-2.0.8/WEB-INF/lib/struts2-core-2.0.8.jar!/struts-default.xml
read)
	at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
	at
java.security.AccessController.checkPermission(AccessController.java:427)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
	at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
	at java.io.File.exists(File.java:700)
	at
com.opensymphony.xwork2.util.FileManager.loadFile(FileManager.java:106)
	at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:824)
	... 44 more

--
Michelle


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message