Hi,
I'm trying to run an web application on websphere using
jsf 2.0 + facelets + jstl.
I have a localhost (websphere 6.1.0.23) and a production (websphere 6.1.0.17) environment.
Localhost works fine but production not.
When I start the EAR on production i get the following error:
3/11/10 9:38:02:208 CET] 0000003b WebGroup A SRVE0169I: Loading Web Module: sun_jsf_20.
3/11/10 9:38:06:126 CET] 0000003b config I Initializing Mojarra 2.0.1 (FCS b02) for context 'sun_jsf_20'
3/11/10 9:38:19:517 CET] 0000003b config I Unsanitized stacktrace from failed start...
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.context.FacesContextFactory' was not configured properly.
.......
3/11/10 9:38:19:707 CET] 0000003b WebApp E Exception caught while initializing context
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! argument type mismatch
.......
3/11/10 9:38:19:845 CET] 0000003b ServletWrappe E SRVE0100E: Did not realize init() exception thrown by servlet Faces Servlet: java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
When setting up localhost I changed the classloader from the application deployment descriptor of the EAR to
classloader mode: PARENT_LAST and WAR classloader policy: APPLICATION.
I also create the following files in the directory Webcontent - META-INF to get rid off the FacesContextFactory error:
- javax.faces.application.ApplicationFactory with content: com.sun.faces.application.ApplicationFactoryImpl
- javax.faces.context.FacesContextFactory with content: com.sun.faces.context.FacesContextFactoryImpl
- javax.faces.lifecycle.LifecycleFactory with conent: com.sun.faces.lifecycle.LifecycleFactoryImpl
- javax.faces.render.RenderKitFactory with content: com.sun.faces.renderkit.RenderKitFactoryImpl
Reference 1:
http://www.denoo.info/2008/02/finally-jsf-12-and-facelets-on-websphere-61/
Reference 2:
http://javawords.com/2009/06/05/using-jsf-12-with-facelets-on-google-app-engine-for-java/
Reference 3:
http://forums.java.net/jive/message.jspa?messageID=165925 (Posted: Oct 30, 2006 2:18 AM by smlp)
When setting up production I changed
class loader order to "Classes loaded with application class loader first". The META-INF is include the EAR.
Reference (Websphere 6.1 Installation Guide):
http://wiki.apache.org/myfaces/Websphere_Installation
Please, help to solve this problem!
Thanks!
Regards,