-
Bug
-
Resolution: Obsolete
-
Major
-
9.0.0.Final
-
None
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.