javaee / mojarra

PLEASE NOTE: This project has moved to Eclipse Foundation and will be archived under the JavaEE GitHub Organization. After Feb. 1, 2021, the new location will be github.com/javaee/mojarra. Mojarra - Oracle's implementation of the JavaServer Faces specification
https://github.com/eclipse-ee4j/mojarra
Other
164 stars 58 forks source link

NullPointerException at WebappLifecycleListener#getActiveSessions when hot deploying a portlet #4168

Open javaserverfaces opened 8 years ago

javaserverfaces commented 8 years ago

When I try to deploy a portlet while the server is running I can observe the following exception. The deployment is nevertheless successfully. This exception doesn't always occur, maybe one in five attempts. I've seen #2005 which includes a proposed solution but the ticket was closed because of inactivity.

2016.07.15 13:09:38,164 INFO  [com.liferay.portal.deploy.auto.PortletAutoDeployListener] (user=, pid=, institution=, rolle=, com.liferay.portal.kernel.deploy.auto.AutoDeployScanner) Portlets for {JBOSS-HOME}\liferay\deploy\example-portlet.war copied successfully. Deployment will start in a few seconds.
2016.07.15 13:09:39,914 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) jndi:/default-host/example-portlet/WEB-INF/faces-config.xml changed!
2016.07.15 13:09:39,918 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) Reloading JSF configuration for context /example-portlet
2016.07.15 13:09:39,919 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) java.lang.NullPointerException
2016.07.15 13:09:39,922 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.ArrayList.<init>(ArrayList.java:177)
2016.07.15 13:09:39,923 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.application.WebappLifecycleListener.getActiveSessions(WebappLifecycleListener.java:349)
2016.07.15 13:09:39,925 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:510)
2016.07.15 13:09:39,926 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener.access$600(ConfigureListener.java:122)
2016.07.15 13:09:39,928 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1039)
2016.07.15 13:09:39,929 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2016.07.15 13:09:39,931 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
2016.07.15 13:09:39,932 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
2016.07.15 13:09:39,933 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
2016.07.15 13:09:39,935 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016.07.15 13:09:39,936 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016.07.15 13:09:39,937 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.lang.Thread.run(Thread.java:745)
2016.07.15 13:09:40,109 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! JBAS018047: Thread local injection container not set
2016.07.15 13:09:40,110 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:376)
2016.07.15 13:09:40,111 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener.reload(ConfigureListener.java:569)
2016.07.15 13:09:40,111 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener.access$600(ConfigureListener.java:122)
2016.07.15 13:09:40,111 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor.run(ConfigureListener.java:1039)
2016.07.15 13:09:40,112 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
2016.07.15 13:09:40,112 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
2016.07.15 13:09:40,112 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
2016.07.15 13:09:40,113 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
2016.07.15 13:09:40,113 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
2016.07.15 13:09:40,114 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
2016.07.15 13:09:40,114 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.lang.Thread.run(Thread.java:745)
2016.07.15 13:09:40,115 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) Caused by: java.lang.IllegalStateException: JBAS018047: Thread local injection container not set
2016.07.15 13:09:40,116 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at org.jboss.as.jsf.injection.JSFInjectionProvider.<init>(JSFInjectionProvider.java:42)
2016.07.15 13:09:40,116 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at sun.reflect.GeneratedConstructorAccessor257.newInstance(Unknown Source)
2016.07.15 13:09:40,117 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2016.07.15 13:09:40,117 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
2016.07.15 13:09:40,117 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at java.lang.Class.newInstance(Class.java:442)
2016.07.15 13:09:40,118 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.spi.InjectionProviderFactory.getProviderInstance(InjectionProviderFactory.java:156)
2016.07.15 13:09:40,118 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.spi.InjectionProviderFactory.createInstance(InjectionProviderFactory.java:117)
2016.07.15 13:09:40,119 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
2016.07.15 13:09:40,119 ERROR [stderr] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1)  ... 10 more

2016.07.15 13:09:40,119 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (user=, pid=, institution=, rolle=, Mojarra-WebResourceMonitor-55-thread-1) Reload complete.
2016.07.15 13:09:42,333 INFO  [org.jboss.web] (user=, pid=, institution=, rolle=, ServerService Thread Pool -- 1895) JBAS018224: Deregistrierung von Webkontext: /example-portlet
2016.07.15 13:09:42,338 SEVERE [javax.faces] (user=, pid=, institution=, rolle=, ServerService Thread Pool -- 1895) Die Anwendung wurde bei Systemstart nicht einwandfrei initialisiert, Factory konnte nicht gefunden werden: javax.faces.application.ApplicationFactory. Rügriff versucht.
2016.07.15 13:09:42,339 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (user=, pid=, institution=, rolle=, ServerService Thread Pool -- 1895) Unexpected exception when attempting to tear down the Mojarra runtime: java.lang.IllegalStateException: Kein Rügriff für javax.faces.application.ApplicationFactory gefunden.
    at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1010) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1]
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:342) [jboss-jsf-api_2.1_spec-2.1.28.SP1-redhat-1.jar:2.1.28.SP1-redhat-1]
    at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:141) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1]
    at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:314) [jsf-impl-2.1.28.SP9-redhat-1.jar:2.1.28.SP9-redhat-1]
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3427) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1]
    at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3939) [jbossweb-7.5.15.Final-redhat-1.jar:7.5.15.Final-redhat-1]
    at org.jboss.as.web.deployment.WebDeploymentService.doStop(WebDeploymentService.java:178) [jboss-as-web-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3]
    at org.jboss.as.web.deployment.WebDeploymentService.access$100(WebDeploymentService.java:61) [jboss-as-web-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3]
    at org.jboss.as.web.deployment.WebDeploymentService$2.run(WebDeploymentService.java:116) [jboss-as-web-7.5.7.Final-redhat-3.jar:7.5.7.Final-redhat-3]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_92]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_92]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_92]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_92]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_92]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122)

Please fix in Version 2.1 otherwise the chances to be included in JBoss EAP 6 will be slim.

Environment

javaserverfaces commented 8 years ago

Reported by SebastianBetker

javaserverfaces commented 8 years ago

Was assigned to ren.zhijun.oracle

javaserverfaces commented 7 years ago

This issue was imported from java.net JIRA JAVASERVERFACES-4164

edburns commented 7 years ago

Please see this important message regarding community contributions to Mojarra.

https://javaee.groups.io/g/jsf-spec/message/30

Also, please consider joining that group, as that group has taken the place of the old dev@javaserverfaces.java.net mailing list.

Thanks,

Ed Burns