aspose file tools*
The moose likes JSF and the fly likes JSF2 error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF2 error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory" Watch "JSF2 error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory" New topic
Author

JSF2 error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory

maro desokey
Greenhorn

Joined: May 21, 2012
Posts: 3
hi
I'm using JSF2 with eclips and tomcat 6 but i face the following error

May 22, 2012 2:55:24 AM org.apache.myfaces.webapp.AbstractFacesInitializer initFaces
SEVERE: An error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory
java.lang.IllegalArgumentException: javax.faces.context.ExceptionHandlerFactory
at javax.faces.FactoryFinder.validateFactoryName(FactoryFinder.java:636)
at javax.faces.FactoryFinder.setFactory(FactoryFinder.java:281)
at org.apache.myfaces.config.FacesConfigurator.setFactories(FacesConfigurator.java:498)
at org.apache.myfaces.config.FacesConfigurator.configureFactories(FacesConfigurator.java:473)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:418)
at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:355)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:142)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
javax.faces.FacesException: org.apache.myfaces.application.ApplicationFactoryImpl
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:573)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:431)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
at com.sun.faces.config.ConfigureListener.application(ConfigureListener.java:400)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:444)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:420)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at org.apache.myfaces.application.ApplicationImpl.getRuntimeConfig(ApplicationImpl.java:245)
at org.apache.myfaces.application.ApplicationImpl.<init>(ApplicationImpl.java:240)
at org.apache.myfaces.application.ApplicationFactoryImpl.createAndLogNewApplication(ApplicationFactoryImpl.java:55)
at org.apache.myfaces.application.ApplicationFactoryImpl.<init>(ApplicationFactoryImpl.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:571)
... 21 more
May 22, 2012 2:55:24 AM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
javax.faces.FacesException: org.apache.myfaces.application.ApplicationFactoryImpl
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:573)
at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:431)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:249)
at com.sun.faces.config.ConfigureListener.application(ConfigureListener.java:400)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:444)
at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:420)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.NullPointerException
at org.apache.myfaces.application.ApplicationImpl.getRuntimeConfig(ApplicationImpl.java:245)
at org.apache.myfaces.application.ApplicationImpl.<init>(ApplicationImpl.java:240)
at org.apache.myfaces.application.ApplicationFactoryImpl.createAndLogNewApplication(ApplicationFactoryImpl.java:55)
at org.apache.myfaces.application.ApplicationFactoryImpl.<init>(ApplicationFactoryImpl.java:50)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:571)
... 21 more
May 22, 2012 2:55:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
May 22, 2012 2:55:24 AM org.apache.catalina.core.StandardContext start
SEVERE: Context [/JSF_Project] startup failed due to previous errors
May 22, 2012 2:55:24 AM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NullPointerException
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:162)
at org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:280)
at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:315)
at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:161)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:3882)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4523)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4387)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
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:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
May 22, 2012 2:55:25 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 22, 2012 2:55:25 AM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8001
May 22, 2012 2:55:25 AM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/63 config=null
May 22, 2012 2:55:25 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 5708 ms



my lib folder contains these jars


jsf-api.jar
jsf-impl.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
jstl.jar
myfaces-api-2.1.7.jar
myfaces-impl-2.1.7.jar
standard.jar
commons-logging-1.1.1.jar
commons-digester-1.8.jar
commons-collections-3.2.jar
commons-codec-1.3.jar
commons-beanutils-1.8.3.jar
common-annotations.jar



and this my web.xml





my index.xhtml









Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15661
    
  15

Welcome to the JavaRanch, Maro!

Your display name needs adjusting. Please take a moment to review this FAQ: http://www.javaranch.com/name.jsp

I think you have too many different versions of too many different things in your WAR. I don't recall needing quite that many JSTL jars and I'm pretty sure that one or more of the myfaces jars repeats classes that are in the JSF api and/or impl jars, since I think that the JSF-impl jar is the Reference Implementation version of JSF and MyFaces also implements those classes.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF2 error occured while initializing MyFaces: javax.faces.context.ExceptionHandlerFactory
 
Similar Threads
Exception sending context initialized event to listener instance of class com.sun.faces.config.Confi
Problem configuring RichFaces3.2.1GA, JSF1.2 and Tomcat6+Eclipse3.4
rich:tree working now... all the work has finally paid off - THANKS
How to implement JSF Facelets Tags
richfaces integration issue