File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Exception when turning Security Manager on Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Exception when turning Security Manager on" Watch "Exception when turning Security Manager on" New topic
Author

Exception when turning Security Manager on

Ralf Schneider
Greenhorn

Joined: Dec 03, 2004
Posts: 4
Hi,

I have some problems when turning the security manager of Tomcat 5.5.9 on.
When I load a JSP that has to be compiled after being changed I get a strange
exception:

ERROR [19.07.2005 23:30:45] (ApplicationDispatcher.java:704) -
Servlet.service() for servlet jsp threw exception
org.xml.sax.SAXException: Internal Error:
File /javax/servlet/resources/web-app_2_3.dtd not found
at
org.apache.jasper.xmlparser.MyEntityResolver.resolveEntity(ParserUtils.java:205)
at org.apache.xerces.util.EntityResolverWrapper.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at
org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:95)
at org.apache.jasper.compiler.JspConfig.processWebDotXml(JspConfig.java:76)
at org.apache.jasper.compiler.JspConfig.init(JspConfig.java:197)
at org.apache.jasper.compiler.JspConfig.findJspProperty(JspConfig.java:249)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:103)

These are only the first few lines of the callstack. The whole exception is
very long.

I also turned debugging on (java.security.debug=access), but there's no
AccessControlException before the SAXException above.

Any ideas what might be the problem?

Best regards,
Ralf.
Ralf Schneider
Greenhorn

Joined: Dec 03, 2004
Posts: 4
I found the solution by myself. The reason for this problem was the JAR file
xercesImpl.jar in my WEB-INF/lib dir. Don't know why this was there, but
after removing it everything works fine again.

Ralf.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Thank you for posting back with the answer


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception when turning Security Manager on
 
Similar Threads
how to write correct url-pattern in security-constraint in tomcat
NoSuchMethodError
Creating UDDI registry using jUDDI
Core tld issue with RAD7.0 & WAS6
No Such Method Error