I'm trying to run an web application on websphere using jsf 2.0 + facelets + jstl.
I have a localhost (websphere 126.96.36.199) and a production (websphere 188.8.131.52) 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
Running JSF in Websphere 6 can be challenging. I don't if there are additional configuration details necessary for JSF 2, but here are my notes about getting JSF 1.2 to run correctly in WAS 6:
1. Change the class loader in the EAR by selecting the application deployment descriptor and picking the “Deployment” tab. Scroll down until you see the “Application” entry at the bottom. Click on the plus sign next to the application so you can see the EAR and the web app, then select the Application. Specify the Classloader mode for the application as PARENT_LAST, and the classloader policy as APPLICATION. Next, select the web application. Specify the classloader mode as PARENT_FIRST (the WAR classloader policy will be grayed out)
2. Make sure the EAR libraries are being seen instead of the files on the server. Select the build path for the web application, then select the “Order and Export” tab. Make sure the EAR libraries are above the WAS 6.1 libraries (do this by selecting the EAR library and pressing the “Up” button until it’s above the WAS 6.1 libraries)
3. Make sure the manifest for the web project has selected all of the .jars from the EAR. Open manifest.mf in META-INF of the WebContent folder. Find the “Dependencies” section, then press “Select all” to ensure that the .jars from the EAR are included. Save your changes to the manifest.
As I said, I don't know if this will work...but it works for JSF 1.2.
For additional information about configuring JSF 2 to run in Tomcat (which might help) see this link: JSF 2 in Tomcat
Joined: Aug 25, 2008
Thank you for the reply, I will try it this week.
I already have a tomcat with jsf 2.0 working.
So much easier!