New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE during parallel deployment #377

Closed
JakubMacoun opened this Issue May 7, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@JakubMacoun

JakubMacoun commented May 7, 2017

I have EAR with two WARs, both using Omnifaces. WildFly server deploys both WARs parallely and when this happens, deployment fails on NullPointerException. This NPE comes from Omnifaces reading home files.
This does not happen when WARs are deployed one by one (meaning outside of EAR, so it's not really a workaround). Stack trace following. Omnifaces version 2.6.2.

java.lang.RuntimeException: 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.RuntimeException: java.lang.NullPointerException
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:236)
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
Caused by: java.lang.NullPointerException
at org.omnifaces.facesviews.FacesViews.scanAndStoreWelcomeFiles(FacesViews.java:403)
at org.omnifaces.facesviews.FacesViews.scanAndStoreViews(FacesViews.java:377)
at org.omnifaces.facesviews.FacesViews.registerForwardingFilter(FacesViews.java:274)
at org.omnifaces.ApplicationInitializer.onStartup(ApplicationInitializer.java:56)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:186)
at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:171)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:234)
... 8 more

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC May 20, 2017

Member

This is awkward. This suggests that the parallel deployments share the same heap during ServletContainerInitializer#onStartup() in some way.

Can you retry with today's latest 2.6.3-SNAPSHOT? I made a change so that WebXml enum isn't indirectly referenced from ServletContainerInitializer.

Member

BalusC commented May 20, 2017

This is awkward. This suggests that the parallel deployments share the same heap during ServletContainerInitializer#onStartup() in some way.

Can you retry with today's latest 2.6.3-SNAPSHOT? I made a change so that WebXml enum isn't indirectly referenced from ServletContainerInitializer.

@JakubMacoun

This comment has been minimized.

Show comment
Hide comment
@JakubMacoun

JakubMacoun May 20, 2017

2.6.3-SNAPSHOT works fine now :). Thank you!

JakubMacoun commented May 20, 2017

2.6.3-SNAPSHOT works fine now :). Thank you!

@BalusC

This comment has been minimized.

Show comment
Hide comment
@BalusC

BalusC May 20, 2017

Member

Great. Thank you for reporting :)

Member

BalusC commented May 20, 2017

Great. Thank you for reporting :)

@BalusC BalusC closed this May 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment