Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-18354

[GSS](7.2.z) Mojarra-4500 - NPE when determining converter for primitive values

    XMLWordPrintable

Details

    • +
    • Hide
      • mvn package the attached maven project (jbeap18354.zip).
      • Deploy in 7.2.5.
      • Access http://localhost:8080/jbeap18354/
      • Click submit (the exception should be thrown in the server.log)
      Show
      mvn package the attached maven project (jbeap18354.zip). Deploy in 7.2.5. Access http://localhost:8080/jbeap18354/ Click submit (the exception should be thrown in the server.log)

    Description

      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)
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-rmartinc Ricardo Martin Camarero
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: