java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory.

Oracle Community | 1378822 | 2 years ago
  1. 0

    could not find Factory: javax.faces.context.Fac... | Oracle Community

    oracle.com | 8 months ago
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    db:: 3.43::JSF IllegalStateException: could not find Factory: javax.faces.context.... 9z

    hivmr.com | 4 months ago
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
  4. 0

    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(FactoryFinder.java:84) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:84) at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:265) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:61) at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58) at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48) at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:502) at weblogic.servlet.internal.ServletStubImpl.checkForReload(ServletStubImpl.java:429) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336) at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196) at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3020) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1925) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1848) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1288) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207) at weblogic.work.ExecuteThread.run(ExecuteThread.java:179) >

    Apache's JIRA Issue Tracker | 1 decade ago | Adam Brod
    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>

    12 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Could not find backup for factory javax.faces.context.FacesContextFactory.

      at javax.faces.FactoryFinder$FactoryManager.getFactory()
    2. JavaEE 7
      FacesServlet.init
      1. javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1010)
      2. javax.faces.FactoryFinder.getFactory(FactoryFinder.java:342)
      3. javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
      3 frames
    3. Atmosphere weblogic
      StubSecurityHelper$ServletInitAction.run
      1. weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:337)
      2. weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:288)
      2 frames
    4. weblogic.security.acl
      AuthenticatedSubject.doAs
      1. weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      1 frame
    5. weblogic.security.service
      SecurityManager.runAs
      1. weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
      1 frame
    6. weblogic.servlet.provider
      WlsSubjectHandle.run
      1. weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
      1 frame
    7. Atmosphere weblogic
      WebAppModule.start
      1. weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:98)
      2. weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:86)
      3. weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:71)
      4. weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:57)
      5. weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:31)
      6. weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:660)
      7. weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:600)
      8. weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1979)
      9. weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1956)
      10. weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1846)
      11. weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2876)
      12. weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1661)
      13. weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:823)
      13 frames
    8. weblogic.application.internal
      ExtensibleModuleWrapper$StartStateChange.next
      1. weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:360)
      2. weblogic.application.internal.ExtensibleModuleWrapper$StartStateChange.next(ExtensibleModuleWrapper.java:356)
      2 frames
    9. weblogic.application.utils
      StateMachineDriver.nextState
      1. weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      1 frame
    10. weblogic.application.internal
      ModuleStateDriver$3.next
      1. weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:138)
      2. weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
      3. weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
      4. weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
      4 frames
    11. weblogic.application.utils
      StateMachineDriver.nextState
      1. weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      1 frame
    12. weblogic.application.internal
      BaseDeployment$2.next
      1. weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:73)
      2. weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
      3. weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
      3 frames
    13. weblogic.application.utils
      StateMachineDriver.nextState
      1. weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
      1 frame
    14. weblogic.application.internal
      DeploymentStateChecker.activate
      1. weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
      2. weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
      3. weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
      3 frames
    15. weblogic.deploy.internal
      DeploymentServiceDispatcher.commit
      1. weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
      2. weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:587)
      3. weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      4. weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      5. weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:151)
      6. weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:339)
      7. weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:846)
      8. weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1275)
      9. weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:442)
      10. weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:176)
      10 frames
    16. weblogic.deploy.service
      DeploymentReceiverCallbackDeliverer$2.run
      1. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      2. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      3. weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      3 frames