Question

i have developed an application using jsf 1.2. it worked fine with apache tomcat 6. i took the war file on production with websphere 7 and deployed the application. i recieved following error.

E com.ibm.ws.webcontainer.servlet.ServletWrapper init SRVE0100E: Uncaught init() 
exception created by servlet Faces Servlet in application Products_war:  
java.lang.IllegalStateException: Application was not properly initialized at startup,  
could not find Factory: javax.faces.context.FacesContextFactory  

my classpath file has following entries

<?xml version="1.0" encoding="UTF-8"?>  
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" 
path="org.eclipse.jdt.launching.JRE_CONTAINER/
org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jre6"/>
<classpathentry kind="con" 
path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget
/Apache Tomcat v6.0"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>

i have made following tries after googling till now..

including following listener in web.xml
<listener>   
    <listener-class>com.sun.faces.config.ConfigureListener</listener-class>   
</listener>   

and removed jsf-api and jsf-impl from the lib folder of my application but to no avail.

plz help.
thanks in advance

Was it helpful?

Solution

WAS 7 already ships with JSF 1.2 bundled which can be either the "Sun RI" (Mojarra) or "MyFaces" (from Apache) implementation which is configureable in the WAS admin console. You need to remove the JSF JAR files from /WEB-INF/lib and you need to remove the listener from the web.xml.

See also:

OTHER TIPS

Another thing to check: We have myfaces configured as a shared library on WebSphere. In troubleshooting my local configuration I had to set the shared library to "Use an isolated class loader for this shared library"

This is identified as part of the requirements for running a third-party JSF implementer:

Be Aware: If the you want to use a third party JSF implementation that is not shipped with the product, then:

  1. Keep the configuration set to the SUN RI.
  2. Add the third party listener to the web.xml file that is required.
  3. Add the third party implementation Java archive (JAR) files to the application as an isolated shared library.

http://pic.dhe.ibm.com/infocenter/wasinfo/v7r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/tweb_jsf.html

Maybe this will help someone if the first answer doesn't work for them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top