Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Tomcat 4 Error: org.xml.sax.SAXParseException: The string "--" is not permitted within comments

1,884 views
Skip to first unread message

Paul

unread,
Apr 7, 2003, 6:31:19 PM4/7/03
to
I wondered if anyone had a good place to start with this error. I have
Linux 7.3/Tomcat 4.1.18 running a java (j2sdk1.4.0_01
jsp/servlets/javabeans) applications. Today I was having problems
between the application and the SQL server database (located on
another machine) it connects to (using the MS Type 4 driver). I am not
using Apache - just Tomcat.

When I went to shutdown tomcat (using shutdown.sh) I got the error
below. I am a linux/tomcat beginner at best. Just a lead on where to
look for an error would be helpful. I really can't say what started
the error - but a user was using the application (which provides a
user interface for entering information about documents in a database)
and the pages started hanging - mainly pages that called the database.

I am curious if this error comes from a tomcat configuration file or
if it comes from a file that is part of the application we are
building. Just knowing that might help. But the fact i can't even get
tomcat started normally again makes me wonder - it must be something
it is reading on startup.

If there is more information i should post please let me know. Thank
you so much. Paul

Error after Shutdown of Tomact:

Apr 7, 2003 5:26:40 PM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 406 column 9: 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(ErrorHandlerWrapper.java:232)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:213)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:375)
at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:305)
at org.apache.xerces.impl.XMLScanner.reportFatalError(XMLScanner.java:1269)
at org.apache.xerces.impl.XMLScanner.scanComment(XMLScanner.java:699)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanComment(XMLDocumentFragmentScannerImpl.java:665)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1487)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:571)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
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)
Catalina.stop: org.xml.sax.SAXParseException: The string "--" is not
permitted within comments.
org.xml.sax.SAXParseException: The string "--" is not permitted within
comments.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1189)
at org.apache.commons.digester.Digester.parse(Digester.java:1495)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:571)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:402)
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)

Wendy S

unread,
Apr 7, 2003, 10:50:33 PM4/7/03
to
Paul wrote:
> I wondered if anyone had a good place to start with this error. I have
> Linux 7.3/Tomcat 4.1.18 running a java (j2sdk1.4.0_01
> jsp/servlets/javabeans) applications.
> Apr 7, 2003 5:26:40 PM org.apache.commons.digester.Digester fatalError
> SEVERE: Parse Fatal Error at line 406 column 9: The string "--" is not
> permitted within comments.
> org.xml.sax.SAXParseException: The string "--" is not permitted within
> comments.

So, what XML files have you been editing? If Tomcat won't start, I'd
suspect server.xml and the global web.xml file, both in
/path/to/tomcat/conf.

After that, check the XML files in each webapp, usually in their WEB-INF
directories.

Look at the comments and make sure you've got matching <!-- and -->'s. Off
the top of my head, I'd say look for nested comments. I think this is
invalid:
<!-- some comment <!-- some other comment --> -->

So if you tried to "comment out" a section that includes a comment, that
might be the problem.

--
Wendy in Chandler, AZ

Paul

unread,
Apr 7, 2003, 11:30:46 PM4/7/03
to
Just wanted to add that the issue was an incorrect comment (<!--
//-->) in the server.xml file that created this error. Comments were
added around other comments, which is what the parser was complaining
about. So this issue is resolved. Thought I would post in case anyone
else gets the same problem.

paulw...@yahoo.com (Paul) wrote in message news:<5ec10496.03040...@posting.google.com>...

Wendy S

unread,
Apr 7, 2003, 11:34:11 PM4/7/03
to
Paul wrote:

> Just wanted to add that the issue was an incorrect comment (<!--
> //-->) in the server.xml file that created this error. Comments were
> added around other comments, which is what the parser was complaining
> about. So this issue is resolved. Thought I would post in case anyone
> else gets the same problem.

No fair! I guessed right and you found it on your own. ;)

Fatima ezzahra Fares

unread,
Sep 8, 2022, 9:00:54 AM9/8/22
to
plz help I have the same problem with this comments
is not permitted within comments
0 new messages