Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0.0-core
-
None
Description
There is possibility of a trinidad-skin.xml in the class path being without any content, mostly due to packaging errrors. In this circumstance, the XML parser callback and error handler implementations in Trinidad just logs the entire stack trace of the SAXException, with no indication of the xml file that fails, this makes it hard to diagnose given that there could be multiple config files that get merged. We need a more informative log message, even better if the message contained the complete path to the specific trinidad-skins.xml file that has the issue.
Here is a sample exception logged that does not provide much useful information:
---------------------------------------------------------------------------------------------------------------------
<TreeBuilder$Handler> <_logError> Parsing error, line 1, column 1:
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1059)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder.parse(TreeBuilder.java:169)
at org.apache.myfaces.trinidadinternal.share.xml.TreeBuilder.parse(TreeBuilder.java:120)
at org.apache.myfaces.trinidadinternal.skin.SkinUtils._getSkinsNodeFromInputStream(SkinUtils.java:256)