Bug 24210 - org.xml.sax.SAXParseException: say which file (incl. path) is concerned
org.xml.sax.SAXParseException: say which file (incl. path) is concerned
Status: NEW
Product: Xerces-J
Classification: Unclassified
Component: SAX
unspecified
All other
: P3 enhancement
: ---
Assigned To: Xerces-J Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2003-10-29 09:48 UTC by Ralf Hauser
Modified: 2004-11-16 19:05 UTC (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser 2003-10-29 09:48:55 UTC
When starting up, tomcat, I got the below error in my startup catalina.log.
Having about >100 classes doing
org.apache.struts.action.Action#perform(ActionMapping, it would be useful to
know which file the error is coming from.

Since it is talking about xml, I found it in struts-config.xml, but some more
hints in the error message are my "request for enhancement". Thx!


Parse Error at line 1333 column 19: The content of element type "action-mappings
" must match "(action)*".
org.xml.sax.SAXParseException: The content of element type "action-mappings" mus
t match "(action)*".
        at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Un
known Source)
        at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
        at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
....
Comment 1 Steve Raeburn 2003-10-29 17:14:52 UTC
I'd say the error message was pretty clear - The content of element type
"action-mappings" must match "(action)". Remember these error messages are aimed
at developers, not end-users so a certain level of technical understanding is
assumed.

Any request for enhancement would have to be sent to the Xerces team, not Struts.
Comment 2 Ralf Hauser 2003-10-29 17:47:45 UTC
a path/filename still wouldn't hurt
Comment 3 Ralf Hauser 2003-10-29 17:49:27 UTC
coming from struts-dev@jakarta.apache.org
Comment 4 Craig McClanahan 2003-10-29 18:06:04 UTC
The challenge, of course, is that this particular error message comes from the
XML parser, not from Struts -- it is out of our control.  At best we could wrap
it in some additional message that also includes the filename, but then you risk
losing some of the other important details (like what line and column if it's a
SAXParseException instead of a SAXException).
Comment 5 Michael Glavassevich 2003-10-29 18:13:12 UTC
SAXParseException [1] already contains information about the resource being 
parsed: its system ID, it public ID, and the position in the document where the 
parser detected the error. Reading this information is the responsibility of 
the application. Since this information is already available, there's no need 
for it to be part of any error messages.

[1] http://www.saxproject.org/apidoc/org/xml/sax/SAXParseException.html
Comment 6 Ralf Hauser 2003-10-29 18:44:12 UTC
.