Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12895

Mojarra-4500 - NPE when determining converter for primitive values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 19.0.0.Beta1, 19.0.0.Final
    • None
    • JSF
    • None
    • WFLY-12885 upgraded mojarra to 2.3.9.SP06.

      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

      <h:selectOneMenu value="#{billingAccountView.billingAccount.commissionable}">
         <f:selectItem itemValue="true" itemLabel="Yes" />
         <f:selectItem itemValue="false" itemLabel="No" />
      </h:selectOneMenu>
      

      Where billingAccountView.billingAccount.commissionable is a primitive boolean

      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)
      

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-ivassile Ilia Vassilev
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: