[jboss-jira] [JBoss JIRA] (WFLY-4349) SEVERE JSF error on undeploy of WS module after Mojarra upgrade to 2.2.10
Farah Juma (JIRA)
issues at jboss.org
Thu Feb 26 13:45:50 EST 2015
[ https://issues.jboss.org/browse/WFLY-4349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13044455#comment-13044455 ]
Farah Juma commented on WFLY-4349:
----------------------------------
In Mojarra 2.2.9, {{ConfigManager}} was [changed | https://java.net/jira/browse/JAVASERVERFACES-3552] to a per-ServletContext singleton instead of a private class variable singleton. In Mojarra 2.2.10, some new checks (i.e., [JAVASERVERFACES-3611 | https://java.net/jira/browse/JAVASERVERFACES-3611]) were introduced to guard against a null {{configManager}} in {{ConfigureListener.contextDestroyed()}}. This is what's causing these SEVERE error messages to occur. Note that this affects JSF apps that do not contain a mapping of {{FacesServlet}} in their web.xml file and also non-JSF apps.
For JSF apps without a mapping of {{FacesServlet}}, {{ConfigureListener}} gets registered twice (this is because of a workaround for a GlassFish issue that was added to Mojarra 2.x a while ago, as described in [JAVASERVERFACES-3189 | https://java.net/jira/browse/JAVASERVERFACES-3189]). The first time {{ConfigureListener.contextDestroyed()}} is called, the error doesn't occur, as expected. However, when {{ConfigureListener.contextDestroyed()}} gets called a second time, {{configManager}} will now evaluate to null in {{ConfigureListener.contextDestroyed()}} since it was already removed from the {{ServletContext}} the first time {{ConfigureListener.contextDestroyed()}} was called, resulting in the error message being logged.
Because {{ConfigureListener}} gets registered for every deployment even if it doesn't use JSF, the same error message will also get logged for non-JSF apps. In this case, {{configManager}} will evaluate to null in {{ConfigureListener.contextDestroyed()}} since it gets [removed | https://github.com/jboss/mojarra/blob/2.2.10-jbossorg-1/jsf-ri/src/main/java/com/sun/faces/config/ConfigureListener.java#L185] from the {{ServletContext}} when {{ConfigureListener.contextInitialized()}} is called.
In both cases mentioned, the {{ConfigManager}} isn't actually expected to exist in the current {{ServletContext}} when {{ConfigureListener.contextDestroyed()}} is called so the SEVERE error message shouldn't be logged. I've created the following upstream issue and I've submitted a patch that fixes this problem by adding an additional check to determine if the {{WebConfiguration}} instance is non-null. If this fix looks good to the Mojarra team, I can apply it to our fork:
https://java.net/jira/browse/JAVASERVERFACES-3797
> SEVERE JSF error on undeploy of WS module after Mojarra upgrade to 2.2.10
> -------------------------------------------------------------------------
>
> Key: WFLY-4349
> URL: https://issues.jboss.org/browse/WFLY-4349
> Project: WildFly
> Issue Type: Bug
> Components: JSF
> Affects Versions: 9.0.0.Alpha1
> Environment: WildFly Full 9.0.0.Alpha2-SNAPSHOT (WildFly Core 1.0.0.Alpha18)
> Oracle JDK 1.7.0_80-ea-b05, Solaris SPARC 10
> Reporter: Frank Langelage
> Assignee: Farah Juma
> Labels: mojarra, undertow
>
> Since latest update I get a SEVERE entry in server.log for every web-module getting undeployed. Those Web-modules contain webservices and are war files inside and ear.
> 15.02. 21:31:48,151 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/production
> 15.02. 21:31:48,151 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi/maj2e-langfr-dev/web
> 15.02. 21:31:48,155 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,201 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/planning
> 15.02. 21:31:48,204 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,239 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,217 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/core
> 15.02. 21:31:48,359 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/sales
> 15.02. 21:31:48,372 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/costing
> 15.02. 21:31:48,379 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/purchase
> 15.02. 21:31:48,381 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,383 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/external
> 15.02. 21:31:48,396 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,397 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,399 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,402 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/inventory
> 15.02. 21:31:48,444 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,404 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/common
> 15.02. 21:31:48,407 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /mbi-ws/maj2e-langfr-dev/distribution
> 15.02. 21:31:48,408 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,480 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> 15.02. 21:31:48,481 SEVERE [javax.enterprise.resource.webcontainer.jsf.config#contextDestroyed] Unexpected state during contextDestroyed: no ConfigManager instance in current ServletContext but one is expected to exist.
> Undeploy of my war file does not generate this SEVERE error.
> 15.02. 21:43:24,243 INFO [org.wildfly.extension.undertow#unregisterDeployment] WFLYUT0022: Unregistered web context: /web-maj2e-langfr-dev
> When I go back to the previous Mojarra 2.2.9-jbossorg-2 the error message disappears.
> There are also a lot of theses SEVERE error messages in the testsuite output files (*.txt).
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the jboss-jira
mailing list