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

JSF application without CDI causes Undertow to crash on deployment

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • 10.0.0.Final
    • 9.0.0.Final
    • JSF
    • None

    Description

      My understanding of the JSF spec is that CDI is not a requirement for JSF to function, though there may be some parts of CDI that are required.

      If I deploy a very simple JSF app to Undertow without CDI, I get the following stack trace:

      Caused by: java.lang.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
      	at java.util.concurrent.ConcurrentHashMap.putAll(ConcurrentHashMap.java:1084)
      	at io.undertow.servlet.spec.ServletContextImpl.<init>(ServletContextImpl.java:128)
      	at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:148)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
      	... 6 more
      

      From debugging the value being put that causes the NPE, it is attempting to add a value of null for the key javax.faces.validator.beanValidator.ValidatorFactory.

      I believe this is a result of https://github.com/wildfly/wildfly/blob/master/jsf/subsystem/src/main/java/org/jboss/as/jsf/deployment/JSFBeanValidationFactoryProcessor.java adding the validation factory as a servlet context attribute whether the retrieval found one or not.

      Attachments

        Activity

          People

            fjuma1@redhat.com Farah Juma
            kfinniga@redhat.com Ken Finnigan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: