myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Brod (JIRA)" <>
Subject [jira] Commented: (MYFACES-1148) Weblogic Classloader problems during development (FactoryFinder)
Date Tue, 21 Feb 2006 13:44:01 GMT
    [ ] 

Adam Brod commented on MYFACES-1148:


Neither of those issues is related, as far as I can tell.


> Weblogic Classloader problems during development (FactoryFinder)
> ----------------------------------------------------------------
>          Key: MYFACES-1148
>          URL:
>      Project: MyFaces Core
>         Type: Bug
>   Components: Implementation
>     Versions: 1.1.1
>  Environment: Weblogic 9.0, 8.1, etc.  Windows XP Pro sp2.
>     Reporter: Adam Brod

> Like most weblogic users, our team develops using the exploded war format.  That means
that each time we deploy a new version of a class, weblogic automatically picks it up.  The
way Weblogic implements this is that when it detects a new class, it drops the classloader
for that class, as well as the Servlet and all helper classes that are loaded by the Servlet.
 That means FacesServlet is dropped and reloaded.
> The problem is that FactoryFinder stores the Factory classes in a Map where the key is
the current classloader.  That works fine until I deploy a new class to my webapp.  At that
point, weblogic drops the classloader and creates a new one with the new class definition.
 Now when FacesServlet.init() calls FactoryFinder.getFactory() (in the new classloader), an
IllegalStateException is generated (see below) because the current classloader is not a valid
key for the _registeredFactoryNames Map.
> One possible solution that I can see to this is to change the key for the Factory map
to use the ServletContext's getServletContextName() as the key.  
> I am 95% sure this same problem exists in Weblogic 7.0, 8.1 and 9.1 since they all use
almost the same Servlet redeployment mechanism.  I have only tried this on Weblogic 9.0.
> <Feb 20, 2006 5:38:07 PM EST> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@164c35f
- name: 'ma-web-1.0-SNAPSHOT
> ', context-path: '/ma'] Root cause of ServletException.
> java.lang.IllegalStateException: No Factories configured for this Application - typically
this is because a context listener is not setup in yo
> ur web.xml.
> A typical config looks like this;
> <listener>
>   <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> </listener>
>         at javax.faces.FactoryFinder.getFactory(
>         at javax.faces.webapp.FacesServlet.init(
>         at weblogic.servlet.internal.StubSecurityHelper$
>         at
>         at
>         at weblogic.servlet.internal.StubSecurityHelper.createServlet(
>         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(
>         at weblogic.servlet.internal.StubLifecycleHelper.<init>(
>         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(
>         at weblogic.servlet.internal.ServletStubImpl.checkForReload(
>         at weblogic.servlet.internal.ServletStubImpl.execute(
>         at weblogic.servlet.internal.TailFilter.doFilter(
>         at weblogic.servlet.internal.FilterChainImpl.doFilter(
>         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(
>         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(
>         at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(
>         at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(
>         at weblogic.servlet.internal.FilterChainImpl.doFilter(
>         at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(
>         at weblogic.servlet.internal.FilterChainImpl.doFilter(
>         at weblogic.servlet.internal.WebAppServletContext$
>         at
>         at
>         at weblogic.servlet.internal.WebAppServletContext.securedExecute(
>         at weblogic.servlet.internal.WebAppServletContext.execute(
>         at
>         at
>         at
> >

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message