NPE运行JSF应用程序作为Swarm uberjar

时间:2016-03-12 22:17:08

标签: wildfly wildfly-swarm

使用JSF应用程序运行Wildfly Swarm导致此NPE:

2016-03-13 08:08:07,370 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 3) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./: java.lang.NullPointerException
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
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:131)
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:150)
    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

如何解决此问题

1 个答案:

答案 0 :(得分:0)

事实证明,包括没有Weld分数的JSF分数会导致NPE。您需要以下内容:

compile 'org.wildfly.swarm:jsf:1.0.0.Beta2'
compile 'org.wildfly.swarm:weld:1.0.0.Beta2'