Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-4655

Cannot resolver managed FacesValidator with empty value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.2
    • 5.0.0, 4.1.0-RC2, 4.0.3
    • General
    • None
    • Eclipse Adoptium jdk-11.0.14.101-hotspot
      Apache Tomcat 10.1.2
      MyFaces 4.0.2
      Weld 4.0.3.Final

    Description

      I'm moving one application from Mojarra to MyFaces.

      One of the page fails on submit because of a NullPointerException in FacesValidatorCDIWrapper.

      I'll try to arrange a standalone reproducer, meanwhile here's the stack trace:

      java.lang.NullPointerException: null
          at org.apache.myfaces.cdi.wrapper.FacesValidatorCDIWrapper.validate(FacesValidatorCDIWrapper.java:59) ~[myfaces-impl-4.0.2.jar:4.0.2]
          at org.apache.myfaces.core.api.shared.ComponentUtils.callValidators(ComponentUtils.java:245) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIInput.validateValue(UIInput.java:463) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UISelectOne.validateValue(UISelectOne.java:166) ~[myfaces-api-4.0.2.jar:4.0.2]
          at org.primefaces.component.selectonemenu.SelectOneMenu.validateValue(SelectOneMenu.java:197) ~[primefaces-13.0.7-jakarta.jar:13.0.7]
          at jakarta.faces.component.UIInput.validate(UIInput.java:717) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIInput.processValidators(UIInput.java:297) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UISelectOne.processValidators(UISelectOne.java:116) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1379) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1372) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1379) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1379) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIForm.processValidators(UIForm.java:200) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1379) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1379) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIViewRoot._processValidatorsDefault(UIViewRoot.java:1758) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIViewRoot$ProcessValidatorPhaseProcessor.process(UIViewRoot.java:1866) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIViewRoot._process(UIViewRoot.java:1714) ~[myfaces-api-4.0.2.jar:4.0.2]
          at jakarta.faces.component.UIViewRoot.processValidators(UIViewRoot.java:972) ~[myfaces-api-4.0.2.jar:4.0.2]
          at org.apache.myfaces.lifecycle.ProcessValidationsExecutor.execute(ProcessValidationsExecutor.java:39) ~[myfaces-impl-4.0.2.jar:4.0.2]
          at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:172) [myfaces-impl-4.0.2.jar:4.0.2]
          at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:125) [myfaces-impl-4.0.2.jar:4.0.2]
          at jakarta.faces.webapp.FacesServlet.service(FacesServlet.java:223) [myfaces-api-4.0.2.jar:4.0.2] 

       

      Attachments

        1. primefaces-test.zip
          10 kB
          Nicola Isotta

        Activity

          People

            Unassigned Unassigned
            NicolaIsotta Nicola Isotta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: