Cannot get factory when tomcat is shutdown
------------------------------------------

                 Key: MYFACES-2822
                 URL: https://issues.apache.org/jira/browse/MYFACES-2822
             Project: MyFaces Core
          Issue Type: Bug
          Components: JSR-314
    Affects Versions: 2.0.0
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


When tomcat is shutdown, the following exception can be seen:

Jul 14, 2010 9:33:59 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class 
org.apache.myfaces.webapp.StartupServletContextListener
java.lang.IllegalStateException: No Factories configured for this Application. 
This happens if the faces-initialization does not work at all - make sure that 
you properly include all configuration settings necessary for a basic faces 
application and that all the necessary libs are included. Also check the 
logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you 
use some special web-containers which do not support registering 
context-listeners via TLD files and a context listener is not setup in your 
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:172)
        at 
org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131)
        at 
org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:189)
        at 
org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:197)
        at 
org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:137)
        at 
org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882)
        at 
org.apache.catalina.core.StandardContext.stop(StandardContext.java:4516)
        at 
org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
        at 
org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:1189)
        at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:1160)
        at 
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:313)
        at 
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1086)
        at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1098)
        at org.apache.catalina.core.StandardEngine.stop(StandardEngine.java:448)
        at 
org.apache.catalina.core.StandardService.stop(StandardService.java:584)
        at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)
        at org.apache.catalina.startup.Catalina.stop(Catalina.java:628)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:603)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

This happens when myfaces api and impl are set on server lib instead 
WEB-INF/lib. A simple var that destroy only when the server has been 
initialized is enough.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to