Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
8.0.7, 8.0.8
-
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.