You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bill Lucy (JIRA)" <de...@myfaces.apache.org> on 2016/01/06 18:09:39 UTC

[jira] [Reopened] (MYFACES-3988) An empty tag in a custom tag-lib causes an Exception

     [ https://issues.apache.org/jira/browse/MYFACES-3988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Lucy reopened MYFACES-3988:
--------------------------------
      Assignee: Bill Lucy  (was: Leonardo Uribe)

Need to port changes to 2.0 and 2.1 releases

> An empty tag in a custom tag-lib causes an Exception
> ----------------------------------------------------
>
>                 Key: MYFACES-3988
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3988
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-344
>    Affects Versions: 2.2.8
>            Reporter: Christopher Meyer
>            Assignee: Bill Lucy
>            Priority: Minor
>             Fix For: 2.2.9
>
>
> While developing a custom tag library we added an empty renderer-type tag like this:
> <tag>
>      <tag-name>myinput</tag-name>
>      <component>
>            <component-type>my.test.MyInput</component-type>
>           <renderer-type></renderer-type>
>      </component>
> </tag>
> This causes the following exception:
> Caused by: java.lang.Exception: Value Cannot be Empty
> 	at org.apache.myfaces.view.facelets.compiler.TagLibraryConfigUnmarshallerImpl$LibraryHandler.endElement(TagLibraryConfigUnmarshallerImpl.java:395)
> 	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> ...
> This appears to be expected based on the code in TagLibraryConfigUnmarshallerImpl. From what I can see the exception appears to be thrown on elements which are used in another spot. If any of them are empty they will throw the above exception. Wildfly/Glassfish does not have the same behavior, so my assumption is they just ignore it.
> Should the MyFaces code be modified to just continue on without the exception, based on the reference implementation? I can quickly create something if so, I just wanted to bring this up to the community at large since I don't know the reasoning behind the difference of the implementations.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)