Re: struts-related exception on tomcat startup

2003-01-02 Thread Craig R. McClanahan


On Thu, 2 Jan 2003, Darrel Riekhof wrote:

> Date: Thu, 02 Jan 2003 11:24:46 -0800
> From: Darrel Riekhof <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: Struts Users Mailing List <[EMAIL PROTECTED]>
> Subject: Re: struts-related exception on tomcat startup
>
> Thanks, that was it.
>
> I put the xercesImpl.jar that came with tomcat 4.1.18 back into its
> common/endorsed dir instead of the xercesImpl-2.2.1.jar that came with
> fop 2.0.5rc.  The startup exception went away, all my webapps work, and
> I can use validation someday!
>
> I didn't realize that tomcat comes with a newer Xerces than 2.2.1, the
> latest official release.
>
>  Hopefully it is fully compatible with fop (so
> far it looks like it is).
>

For posterity (and searchability in mailing list archives):  messing with
the way that Tomcat exposes an XML parser to web applications is almost
always going to cause you grief.  There are way too many intricate
interdependencies (especially on a JDK 1.4 system when there's an XML
parser implementation inside the JDK) to start replacing things globally.

> Darrel

Craig


>
> Craig R. McClanahan wrote:
>
> >On Wed, 1 Jan 2003, Darrel Riekhof wrote:
> >
> >
> >
> >>Date: Wed, 01 Jan 2003 20:19:15 -0800
> >>From: Darrel Riekhof <[EMAIL PROTECTED]>
> >>Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> >>To: [EMAIL PROTECTED]
> >>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
> >
> >
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: struts-related exception on tomcat startup

2003-01-02 Thread Darrel Riekhof
Thanks, that was it.

I put the xercesImpl.jar that came with tomcat 4.1.18 back into its 
common/endorsed dir instead of the xercesImpl-2.2.1.jar that came with 
fop 2.0.5rc.  The startup exception went away, all my webapps work, and 
I can use validation someday!

I didn't realize that tomcat comes with a newer Xerces than 2.2.1, the 
latest official release.  Hopefully it is fully compatible with fop (so 
far it looks like it is).

Darrel

Craig R. McClanahan wrote:

On Wed, 1 Jan 2003, Darrel Riekhof wrote:

 

Date: Wed, 01 Jan 2003 20:19:15 -0800
From: Darrel Riekhof <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
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
 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts-related exception on tomcat startup

2003-01-02 Thread Craig R. McClanahan


On Wed, 1 Jan 2003, Darrel Riekhof wrote:

> Date: Wed, 01 Jan 2003 20:19:15 -0800
> From: Darrel Riekhof <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> 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.NativeMethodAcce