esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darren Hague <dha...@fortybeans.com>
Subject Problem deploying to Tomcat on Ubuntu - with solution
Date Fri, 02 Jan 2009 17:20:17 GMT
Hi all,

I have installed Tomcat 6.0.18 on my Ubuntu dev box (using the Synaptic 
Package Manager), but it wouldn't start a deployed ESME instance.

The ESME instance in question was from the latest Subversion drop, and 
worked fine in Jetty (mvn jetty:run). I then built a War file (mvn 
war:war), rename the resulting esme-0.2.3-SNAPSHOT.war file to esme.war 
and deployed to Tomcat using the Tomcat Web Application Manager.  The 
result is that I could see the deployed application in the Tomcat 
Manager, but it would not start.

The Tomcat log file had the following error:
02-Jan-2009 12:28:56 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application at '/esme'
02-Jan-2009 12:28:56 org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter LiftFilter
java.lang.ExceptionInInitializerError
    at net.liftweb.util.LogBoot$.findTheFile$1(Log.scala:95)
    at net.liftweb.util.LogBoot$._log4JSetup(Log.scala:98)
    at net.liftweb.util.LogBoot$$anonfun$2.apply(Log.scala:76)
    at net.liftweb.util.LogBoot$$anonfun$2.apply(Log.scala:76)
    at net.liftweb.util.LogBoot$.checkConfig(Log.scala:74)
    at 
net.liftweb.util.LogBoot$.net$liftweb$util$LogBoot$$_logger(Log.scala:120)
    at net.liftweb.util.LogBoot$$anonfun$3.apply(Log.scala:122)
    at net.liftweb.util.LogBoot$$anonfun$3.apply(Log.scala:122)
    at net.liftweb.http.LiftRules$.<init>(LiftRules.scala:552)
    at net.liftweb.http.LiftRules$.<clinit>(LiftRules.scala)
    at net.liftweb.http.LiftFilter.init(LiftServlet.scala:516)
    at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
    at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
    at 
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
    at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
    at 
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)
    at 
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:604)
    at 
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:129)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    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:597)
    at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
    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:276)
    at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
    at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
    at 
org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
    at 
org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
    at java.security.AccessController.doPrivileged(Native Method)
    at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
    at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.security.AccessControlException: access denied 
(java.util.PropertyPermission user.name read)
    at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
    at 
java.security.AccessController.checkPermission(AccessController.java:546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at 
java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
    at java.lang.System.getProperty(System.java:652)
    at net.liftweb.util.Props$.<init>(Props.scala:85)
    at net.liftweb.util.Props$.<clinit>(Props.scala)
    ... 46 more


The problem is highlighted in the "Caused by" exception:
java.security.AccessControlException: access denied 
(java.util.PropertyPermission user.name read)

The simple solution is as follows - just turn off the Tomcat security 
manager, which is enabled by default with the Ubuntu package.
/etc/init.d/tomcat6:
TOMCAT6_SECURITY=no  (instead of yes)

The more complex solution would be to specify the correct security 
policy commands, but that is beyond the scope of this email...

I hope this helps someone,
Darren


Mime
View raw message