]
Ricardo Martin Camarero updated WFLY-12895:
-------------------------------------------
Fix Version/s: 19.0.0.Beta1
Mojarra-4500 - NPE when determining converter for primitive values
------------------------------------------------------------------
Key: WFLY-12895
URL:
https://issues.redhat.com/browse/WFLY-12895
Project: WildFly
Issue Type: Bug
Components: JSF
Reporter: Ilia Vassilev
Assignee: Ricardo Martin Camarero
Priority: Major
Fix For: 19.0.0.Beta1
https://github.com/eclipse-ee4j/mojarra/issues/4500
On Version 2.3.5 when the backing bean value is a primitive (int, boolean, etc) there is
a NPE during the validation phase.
This is a regression from 2.2
{code}
<h:selectOneMenu
value="#{billingAccountView.billingAccount.commissionable}">
<f:selectItem itemValue="true" itemLabel="Yes" />
<f:selectItem itemValue="false" itemLabel="No" />
</h:selectOneMenu>
{code}
Where billingAccountView.billingAccount.commissionable is a primitive boolean
{code}
15:27:04,781 SEVERE [javax.enterprise.resource.webcontainer.jsf.renderkit] (default
task-2) Could not instantiate converter for type boolean: java.lang.NullPointerException
15:27:04,781 SEVERE [javax.enterprise.resource.webcontainer.jsf.renderkit] (default
task-2) : java.lang.NullPointerException
at com.sun.faces.cdi.CdiUtils.createConverter(CdiUtils.java:125)
at com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:1458)
at
javax.faces.application.ApplicationWrapper.createConverter(ApplicationWrapper.java:425)
at
org.omnifaces.cdi.converter.ConverterManager.createConverter(ConverterManager.java:155)
at
org.omnifaces.cdi.converter.ConverterManager$Proxy$_$$_WeldClientProxy.createConverter(Unknown
Source)
at org.omnifaces.application.OmniApplication.createConverter(OmniApplication.java:98)
at
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:127)
at
com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectOneValue(MenuRenderer.java:194)
at
com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:341)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1122)
at javax.faces.component.UIInput.validate(UIInput.java:1030)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1334)
at javax.faces.component.UIInput.processValidators(UIInput.java:757)
at javax.faces.component.UISelectOne.processValidators(UISelectOne.java:207)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1298)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1298)
at javax.faces.component.UIForm.processValidators(UIForm.java:269)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1298)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1298)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1298)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1332)
at
com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:77)
{code}