Error java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
elegar Aug 11, 2011 3:52 AMWell, for my project spring-webflow+richfaces, i Jboss give me the error:
02:36:22,989 ERROR [stderr] (MSC service thread 1-5) log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). 02:36:22,990 ERROR [stderr] (MSC service thread 1-5) log4j:WARN Please initialize the log4j system properly. 02:36:22,990 ERROR [stderr] (MSC service thread 1-5) log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. 02:36:24,352 INFO [org.hibernate.validator.util.Version] (MSC service thread 1-5) Hibernate Validator 4.2.0.Final 02:36:26,057 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/projvehimerc]] (MSC service thread 1-5) Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:137) [myfaces-impl-2.1.1.jar:] at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:186) [myfaces-impl-2.1.1.jar:] at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1456) [jboss-jsf-api_2.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:404) [myfaces-impl-2.1.1.jar:] at org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:376) [myfaces-impl-2.1.1.jar:] at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:105) [myfaces-impl-2.1.1.jar:] at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT] at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.1.0.Alpha1-SNAPSHOT] at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.1.0.Alpha1-SNAPSHOT.jar:7.1.0.Alpha1-SNAPSHOT] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765) at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25] at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
my web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <display-name>richfaces-application</display-name> <!-- Listener para crear el Spring Container compartido por todos los Servlets y Filters (WebApplication Context)--> <context-param> <param-name>contextConfigLocation</param-name> <param-value> classpath*:META-INF/spring/spring-master.xml WEB-INF/spring/spring-security.xml </param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- For JSF --> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <!-- Spring JavaServiceFace framework ApachaMyfaces --> <context-param> <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> <param-value>com.sun.facelets.FaceletViewHandler</param-value> </context-param> <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> <!-- Spring Security, for all --> <filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- RichFaces Framework --> <!-- For control of skins --> <context-param> <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name> <param-value>enable</param-value> </context-param> <!-- Servlets --> <!-- Servlets for JSF--> <servlet> <servlet-name>faces</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>faces</servlet-name> <url-pattern>*.xhtml</url-pattern> <url-pattern>/faces/*</url-pattern> </servlet-mapping> <!-- Servlet for Dispatcher of flows --> <servlet> <servlet-name>transportes</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>WEB-INF/spring/transportes-servlet.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>transportes</servlet-name> <url-pattern>/flows/*</url-pattern> </servlet-mapping> <!-- Servlet register for SpringFaces, SpringJavaScript --> <servlet> <servlet-name>resources</servlet-name> <servlet-class>org.springframework.js.resource.ResourceServlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>resources</servlet-name> <url-pattern>/resources/*</url-pattern> </servlet-mapping> <!-- Page That control SpringWeb --> <error-page> <error-code>404</error-code> <location>/WEB-INF/jsp/error.jsp</location> </error-page> <welcome-file-list> <welcome-file>/WEB-INF/flows/login.xhtml</welcome-file> </welcome-file-list> </web-app>
Pls, what's my error????