I'm using a freshly installed Tomcat6 on Intrepid Ubuntu having done:

sudo apt-get install tomcat6
sudo apt-get install tomcat6-docs
sudo apt-get install tomcat6-examples
sudo apt-get install tomcat6-admin

I modified the Realm to use a MemoryRealm. I then used the Tomcat Web Application Manager to deploy axis2.war (from axis2-1.4.1-war.zip). This succeeded, as I get the following response:

OK - Deployed application at context path /axis2

and I can see the the axis2.war and "exploded" or unpacked directory axis2 under /var/lib/tomcat6/webapps/ ($CATALINA_BASE/webapps). However, when I go to http://localhost:8080/axis2, I get one of two different exceptions...

If I issue
 sudo /etc/init.d/tomcat6 restart
first, then go to http://localhost:8080/axis2, I get:


HTTP Status 500 -

------------------------------------------------------------------------

*type* Exception report

*message*

*description* _The server encountered an internal error () that prevented it from fulfilling this request._

*exception*

org.apache.jasper.JasperException: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.jasper.compiler) org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:207)
   org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

*root cause*

java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.org.apache.jasper.compiler) java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) java.security.AccessController.checkPermission(AccessController.java:546)
   java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
   java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1512)
   sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:298)
   java.lang.ClassLoader.loadClass(ClassLoader.java:300)
   java.lang.ClassLoader.loadClass(ClassLoader.java:252)
   java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:203) org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
   org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
   org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:91)
   org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

*note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs._

------------------------------------------------------------------------


    Apache Tomcat/6.0.18




If I goto http://localhost:8080/axis2 a second time (or immediately after redeploying the war file without a tomcat restart), I get:


HTTP Status 500 -

------------------------------------------------------------------------

*type* Exception report

*message*

*description* _The server encountered an internal error () that prevented it from fulfilling this request._

*exception*

org.apache.jasper.JasperException: org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/web.xml org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:207)
   org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

*root cause*

org.apache.jasper.JasperException: XML parsing error on file /WEB-INF/web.xml org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:108) org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:91)
   org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

*root cause*

org.xml.sax.SAXException: Internal Error: File /javax/servlet/resources/web-app_2_3.dtd not found org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:203) org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
   org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
   org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:96) org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:91)
   org.apache.jasper.compiler.JspConfig.init(JspConfig.java:220)
org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:273)
   org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:112)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
   org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   java.lang.reflect.Method.invoke(Method.java:597)
   org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
   java.security.AccessController.doPrivileged(Native Method)
   javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)

*note* _The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs._

------------------------------------------------------------------------


    Apache Tomcat/6.0.18


Seems like some sort of permissions problem, but for the 2nd exception, from what I can see web-app_2_3.dtd should be readable:

$ jar tf /var/lib/tomcat6/lib/servlet-api.jar  | grep web-app_2.3
javax/servlet/resources/web-app_2_3.dtd
$ ls -la /var/lib/tomcat6/lib/servlet-api.jar
lrwxrwxrwx 1 root root 38 2009-01-12 22:22 /var/lib/tomcat6/lib/servlet-api.jar -> /usr/share/tomcat6/lib/servlet-api.jar $ ls -la /usr/share/tomcat6/lib/servlet-api.jar lrwxrwxrwx 1 root root 30 2009-01-12 22:22 /usr/share/tomcat6/lib/servlet-api.jar -> ../../java/servlet-api-2.5.jar $ ls -la /usr/share/tomcat6/lib/../../java/servlet-api-2.5.jar -rw-r--r-- 1 root root 84445 2008-10-24 09:14 /usr/share/tomcat6/lib/../../java/servlet-api-2.5.jar

Any suggestions to the problem? BTW, I successfully deployed and ran the 'sample' webapp that comes with Tomcat using the same deployment approach, so I think Tomcat is up and running fine.

William

Reply via email to