struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: struts-related exception on tomcat startup
Date Thu, 02 Jan 2003 17:10:32 GMT


On Wed, 1 Jan 2003, Darrel Riekhof wrote:

> Date: Wed, 01 Jan 2003 20:19:15 -0800
> From: Darrel Riekhof <riekhof@lvcm.com>
> Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
> To: struts-user@jakarta.apache.org
> Subject: struts-related exception on tomcat startup
>
> I'm getting the exception below whenever I start tomcat.  It looks like
> it has to be one of the struts apps deployed on tomcat, but I don't know
> which one, and I don't know which file it's complianing about.
>

The exception report you're seeing was caused by a bug in the XML parser
that was shipped in older versions of Tomcat, and tripped over when
parsing the "struts-config_1_0.dtd" file (Struts 1.0.2).  The actual error
message text is bogus -- the real problem is that one of the lines in the
DTD was longer than 80 characters (which is legal from an XML perspective,
but was not being handled correctly by Xerces).

The problem was fixed in Xerces, and the version shipped with Tomcat
4.1.18 should no longer have this problem.  If you're still getting it,
that implies you might be including an XML parser in your webapp, or
otherwise modifying the default configuration of Tomcat to include an
older parser that still has the bug.  Try it with an unmodified Tomcat
install and things should work.

> I started getting this as soon as I switched tomcat over to the xml jars
> included with FOP 2.0.5, which I assume are a little more recent that
> the xml jars that come with tomcat.  Btw, the trace seems to be
> harmless, all the webapps I care about still work, but I'd still like to
> fix the bad comment wherever it is to get rid of this exception, just
> for peace of mind. :)  I suspect the tomcat admin webapp as the culprit,
> but I've checked all its config files very carefully, no bad comments on
> line 551...
>

It's not a totally harmless message -- it seems that Xerces skips
validation (since it could not successfully read thte DTD), even if you
ask for it.

> Does anyone recognize this trace and know which webapp/file is to blame?
>  Or, can I get tomcat to tell me more info while it's booting up?
>
> Darrel
>

Craig


> ---------- stacktrace below ----------
>
> Starting service Tomcat-Standalone
> Apache Tomcat/4.1.18
> Parse Fatal Error at line 551 column 44: The string "--" is not
> permitted within comments.
> org.xml.sax.SAXParseException: The string "--" is not permitted within
> comments.
>         at
> org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
> Source)
>         at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
> Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
>         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
> Source)
>         at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown
> Source)
>         at org.apache.xerces.impl.XMLScanner.scanComment(Unknown Source)
>         at org.apache.xerces.impl.XMLDTDScannerImpl.scanComment(Unknown
> Source)
>         at org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(Unknown
> Source)
>         at
> org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(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.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at javax.xml.parsers.SAXParser.parse(Unknown Source)
>         at javax.xml.parsers.SAXParser.parse(Unknown Source)
>         at org.apache.struts.digester.Digester.parse(Digester.java:755)
>         at
> org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1434)
>         at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:474)
>         at
> org.apache.webapp.admin.ApplicationServlet.init(ApplicationServlet.java:152)
>         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:934)
>         at
> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:821)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3420)
>         at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:3608)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
>         at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
>         at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
>         at
> org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:529)
>         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:324)
>         at
> org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:228)
>         at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
>         at
> org.apache.commons.digester.Digester.endElement(Digester.java:1036)
>         at
> org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown
> Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
> Source)
>         at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
> Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
>         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>         at org.apache.commons.digester.Digester.parse(Digester.java:1514)
>         at
> org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:335)
>         at
> org.apache.catalina.core.StandardHost.install(StandardHost.java:803)
>         at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:452)
>         at
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:409)
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:879)
>         at
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:368)
>         at
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
>         at
> org.apache.catalina.core.StandardService.start(StandardService.java:497)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2189)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>         at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>         at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>         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:324)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message