MyFaces Core
  1. MyFaces Core
  2. MYFACES-3537

TagLibraryConfig doesn't recognize <facelet-taglib><description>

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.7
    • Fix Version/s: 2.0.14, 2.1.8
    • Component/s: General
    • Labels:
      None
    • Environment:
      Windows 7 x64, JDK 1.7.0_4, Eclipse Indigo SR2, Tomcat 7.0.27, MyFaces 2.1.7

      Description

      The trigger is this OmniFaces issue: http://code.google.com/p/omnifaces/issues/detail?id=9

      OmniFaces has a <description> element right before <namespace> element in the taglib.xml files which describes the taglib.

      <facelet-taglib id="o"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
      version="2.0"
      >
      <description>OmniFaces UI components.</description>
      <namespace>http://omnifaces.org/ui</namespace>

      ...
      </facelet-taglib>

      It get parsed fine on Mojarra, but on MyFaces 2.1.7 the following exception occurs:

      Caused by: org.xml.sax.SAXException: Error Handling [jar:file:/C:/Users/BalusC/Documents/Work/M4N/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/omnifaces_test/WEB-INF/lib/omnifaces.jar!/META-INF/omnifaces-ui.taglib.xml@20,33] <description>
      at org.apache.myfaces.view.facelets.compiler.TagLibraryConfig$LibraryHandler.endElement(TagLibraryConfig.java:609)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:606)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1741)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2898)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
      at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
      at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
      at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
      at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
      at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:302)
      at javax.xml.parsers.SAXParser.parse(SAXParser.java:195)
      at org.apache.myfaces.view.facelets.compiler.TagLibraryConfig.create(TagLibraryConfig.java:788)
      ... 37 more

      Removing the <description> element solves the problem. But this is not what we want. Putting the <description> element after the <namespace> element also solves the problem, but Eclipse marks the XML invalid according the XSD.

        Activity

        Hide
        Hudson added a comment -

        Integrated in tobago-trunk #976 (See https://builds.apache.org/job/tobago-trunk/976/)
        TOBAGO-1229: Using Facelets 2.0 from JSF 2.0 instead of Facelets 1.1 from Sun

        • not writing the tags "description" and "display-name" in the root tag, because of SAXParser exception (see MYFACES-3537) (Revision 1455954)

        Result = UNSTABLE
        lofwyr : http://svn.apache.org/viewvc/?view=rev&rev=1455954
        Files :

        • /myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java
        Show
        Hudson added a comment - Integrated in tobago-trunk #976 (See https://builds.apache.org/job/tobago-trunk/976/ ) TOBAGO-1229 : Using Facelets 2.0 from JSF 2.0 instead of Facelets 1.1 from Sun not writing the tags "description" and "display-name" in the root tag, because of SAXParser exception (see MYFACES-3537 ) (Revision 1455954) Result = UNSTABLE lofwyr : http://svn.apache.org/viewvc/?view=rev&rev=1455954 Files : /myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/java/org/apache/myfaces/tobago/apt/processor/TaglibGenerator.java

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Bauke Scholtz
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development