myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Udupa (JIRA)" <>
Subject [jira] [Created] (TRINIDAD-2419) Need to check validity of FacesContext for before servicing resource requests
Date Mon, 07 Oct 2013 20:18:45 GMT
Prakash Udupa created TRINIDAD-2419:

             Summary: Need to check validity of FacesContext for before servicing resource
                 Key: TRINIDAD-2419
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Archetype
    Affects Versions: 2.0.1-core
            Reporter: Prakash Udupa

We have been seeing issues with our automated tests failing in a farm environment due to a
valid FacesContext not being available for a request, particularly for a request for a resource.
The logs show the following errors when this happens:

FacesContext: com.sun.faces.config.InitFacesContext@1b5e765
ServletContext: null
at org.apache.myfaces.trinidadinternal.resource.CoreRenderKitResourceLoader.getLocale(
at org.apache.myfaces.trinidadinternal.resource.CoreRenderKitResourceLoader.getLocaleElementsURI(
at org.apache.myfaces.trinidadinternal.resource.LocaleElementsResourceLoader._getLibraries(
at org.apache.myfaces.trinidadinternal.resource.LocaleElementsResourceLoader.getURL(
at org.apache.myfaces.trinidadinternal.resource.LocaleElementsResourceLoader.findResource(
at org.apache.myfaces.trinidad.resource.ResourceLoader.getResource(
at org.apache.myfaces.trinidad.resource.RegexResourceLoader.findResource(
at org.apache.myfaces.trinidad.resource.ResourceLoader.getResource(
at org.apache.myfaces.trinidad.resource.CachingResourceLoader.findResource(
at org.apache.myfaces.trinidad.resource.ResourceLoader.getResource(
at org.apache.myfaces.trinidad.webapp.ResourceServlet.getLastModified(
at avax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.myfaces.trinidad.webapp.ResourceServlet.service(
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper$
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
at weblogic.servlet.internal.ServletStubImpl.execute(
at weblogic.servlet.internal.TailFilter.doFilter(
at weblogic.servlet.internal.FilterChainImpl.doFilter(
at Method)
at weblogic.servlet.internal.FilterChainImpl.doFilter(

We could trace this back to some variant of the following implementation issue in Mojarra

The issue is that the FacesContext is not being cleaned up properly, so new requests could
get hold of an invalid but non null FacesContext hanging around.

A solution for this is for the ResourceServlet to check and see if we have a bogus FacesContext,
in which case, discard it and recreate a good one. The suggested code change is a simple addition
to an existing code that checks for a non-null FacesContext.

This message was sent by Atlassian JIRA

View raw message