Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2050

NO GOOD DIAGNOSTIC MESSAGE FROM SKINNING FRAMEWORK FOR CASE OF BLANK TRINIDAD-SKINS.XML

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-core
    • 2.0.0-core
    • Skinning
    • 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)

      Attachments

        Activity

          People

            jeanne.waldman@oracle.com Jeanne Waldman
            pudupa Prakash Udupa
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified