Take the 2-minute tour ×

I have created web dynamic project with jsf2, Primefaces 3.4, Tomcat7.Application runs fine. If i deploy the EAR of the same project on Websphere8 instead of Tomcat7, I am getting Exceptions.I am not sure of what is happening. I am new to JSF2 and Wepshere8.

can you provide me the links on how to start sample jsf2 + primefaces project on Websphere 8

Thanks in advance.

share|improve this question
what is the exception you get? can you share that? –  harish.raj Nov 28 '12 at 5:57
A typical config looks like this; <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listene‌​r-class> </listener> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:196) at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesCont‌​extImplBase.java:131) at –  shreekanth Nov 28 '12 at 6:07
In future questions, never ignore exceptions as if they are decoration. They represent namely the whole answer to the concrete problem. If you are not capable to interpret them, you should not ignore them, but copypaste them in their entirety into your question. This way we can translate them for you in layman's terms, so that you should be able to solve the problem based on the information provided in the exception. –  BalusC Nov 28 '12 at 13:57

3 Answers 3

Got it. Try to add com.sun.faces.config.ConfigureListener instead of org.apache.myfaces.webapp.StartupServletContextListener in your web.xml, restart your server and then run it.

The code should look like the following.

share|improve this answer
after adding above listener..Unsanitized stacktrace from failed start... com.sun.faces.config.ConfigurationException: Source Document: Cause: Unable to create a new instance of 'com.sun.faces.application.resource.ResourceHandlerImpl': java.lang.NullPointerException at –  shreekanth Nov 28 '12 at 6:31
com.sun.faces.config.processor.AbstractConfigProcessor.createInstance(AbstractCo‌​nfigProcessor.java:289)at com.sun.faces.config.processor.ApplicationConfigProcessor.setResourceHandler(App‌​licationConfigProcessor.java:748)at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationCon‌​figProcessor.java:306)at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfig‌​Processor.java:110) –  shreekanth Nov 28 '12 at 6:33
harish.raj: can you explain me why listener class to be added. or provide me any links so that i can go through.. It is currently a black box to me i dont know whats happening here in my code.. –  shreekanth Nov 28 '12 at 6:35
@shreekanth, pl make sure you have added all the jar files in WEB-INF/lib folder. And the reason why I have added is, Tomcat will understand the jars available in build path. But WAS can't. you need to use the in-built Listener and all the jar files in lib folder to get it worked. thats it. –  harish.raj Nov 28 '12 at 6:46
:one more thing I have noticed here, I removed jar files jsf-api-2.03 and jsf-impl-2.03 and redeployed the ear, by running Admin console of WAS 8 and selected options of myfaces under jsp and jsf options, application works fine..Now again I added back jar files which i removed and re deploying back the ear error is back again.. Is that WAS8 has default jsf jars within it??? Are we not supposed to add jsf jars in lib folder under prject??? –  shreekanth Nov 28 '12 at 8:40

To solve the classloader of primefaces in websphere 8.5 classes replace the jsf jsf-api jsf-impl javaee-api for the native implementation of websphere myfaces-api myfaces-impl

share|improve this answer

For using different implementations of JSF, the WebSphere Application Server JSF engine determines if the SUN RI or Apache MyFaces is used from the application server run time. After the JSF engine determines the implementation that is used, the correct listener class is registered with the web container. You do not need to add the com.sun.faces.ConfigureListener or the org.apache.myfaces.StartupConfigureListener to the web.xml file.


Please see above...

share|improve this answer

Your Answer


