You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Do...@Lawson.com on 2005/07/11 19:56:04 UTC
Problems in Websphere 6.0 when using myfaces/tiles
I'm having trouble getting myfaces running satisfactorily under websphere
network deployment 6. Everything seems to be classloader related i.e.
websphere packages its own jsf-api.jar with implementation of
FacesServlet.
In general the behaviour I saw was the jsf pages were being truncated i.e.
only some portion of the html was being returned by the websphere web
server.
In an attempt bypass IBM's jsf world, I defined all the factory classes
in the factory node of my web apps faces-config.xml as follows.
<factory>
<application-factory>
org.apache.myfaces.application.ApplicationFactoryImpl
</application-factory>
<faces-context-factory>
org.apache.myfaces.context.FacesContextFactoryImpl
</faces-context-factory>
<lifecycle-factory>
org.apache.myfaces.lifecycle.LifecycleFactoryImpl
</lifecycle-factory>
<render-kit-factory>
org.apache.myfaces.renderkit.RenderKitFactoryImpl
</render-kit-factory>
</factory>
Still no dice. I get a class cast exception
java.lang.ClassCastException:
org.apache.myfaces.application.ApplicationImpl
at
com.ibm.ws.jsf.configuration.FacesConfigParser.createFacesFactories(FacesConfigParser.java:950)
at
com.ibm.ws.jsf.configuration.FacesConfigParser.initializeConfiguration(FacesConfigParser.java:327)
at
com.ibm.ws.jsf.util.FacesConfigUtil._parseJSFConfiguration(FacesConfigUtil.java:128)
at
com.ibm.ws.jsf.util.FacesConfigUtil.parseJSFConfiguration(FacesConfigUtil.java:82)
My last resort was to place the jsf-api.jar provided by websphere into the
console application's WEB-INF/libs directory and restart websphere. At
that point, My jsf pages loaded correctly on one of my websphere
appservers and not the other.
I've tried changing the websphere classloader for my web app to be
PARENT_LAST.
Any ideas, how I can avoid all this? It seems that if I can guarantee
that myfaces javax.faces.webapp.FacesServlet gets loaded then I'm ok.