Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-3807

javax.faces:jsf.js cannot anymore be found

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.0.7, 8.0.8
    • 8.0.9
    • None

    Description

      Since: 

      TomEE 8.0.7 (8.0.8 is also affected; 8.0.6 was latest which worked fine).

       

      Problem:

      JSF API resources have a wrong library name in `/lib/myfaces-api-2.3.9.jar/META-INF/resources` folder. It's named `jakarta.faces` as per JSF 3.x instead of `javax.faces` as per JSF 2.x.

       

      Consequence:

      Anytime a component needs to auto-include the `javax.faces:jsf.js` script file such as `<h:commandLink>` or `<f:ajax>`, then it couldn't be found in the JAR and ultimately the following exception is thrown:

      ```

      java.lang.NullPointerException java.lang.NullPointerException at org.apache.myfaces.shared.renderkit.html.util.ResourceUtils.renderDefaultJsfJsInlineIfNecessary(ResourceUtils.java:183) at org.apache.myfaces.shared.renderkit.html.HtmlButtonRendererBase.encodeBegin(HtmlButtonRendererBase.java:135)

      ```

       

      Solution: fix TomEE build system to not rename the `javax.faces` library name to `jakarta.faces` as long as JSF 2.x is still used instead of JSF 3.x or newer.

      Attachments

        Activity

          People

            Unassigned Unassigned
            balusc Bauke Scholtz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: