]
Tomaz Cerar commented on WFLY-4889:
-----------------------------------
Is this still the case with WildFly 10?
JSF application without CDI causes Undertow to crash on deployment
------------------------------------------------------------------
Key: WFLY-4889
URL:
https://issues.jboss.org/browse/WFLY-4889
Project: WildFly
Issue Type: Bug
Components: JSF
Affects Versions: 9.0.0.Final
Reporter: Ken Finnigan
Assignee: Farah Juma
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:
{noformat}
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
{noformat}
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/jav...
adding the validation factory as a servlet context attribute whether the retrieval found
one or not.