I have an application which starts in tomcat and fails in Websphere 6, the reason seems some kind of clash between jsf-spring and the websphere 6 classloader.
If I move the code to the standard spring jsf variable resolver everything starts to work.
the problem seems to be somewhere in the jsf-spring ContextLoaderListener.
Here is the error output.
Test configuration:
MyFaces 1.1.1 and nightlies, Hibernate 3.0.5 and Spring 1.2.6
Does anyone have a clue on how to resolve this without having to change the configuration to Spring only.
0000017 SystemErr R java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at de.mindmatters.faces.spring.support.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:221)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1355)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:371)
at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114)
at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127)
at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:1678)
at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
WebSphere 6 comes with JSF 1.0 components. As you have included the JSF 1.1.1 libraries, you could try setting either the application or application server classloader to PARENT_LAST. This will ensure that your application classes are loaded first, prior to the relevant WebSphere classes.
Hope this helps.
charly.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Actually I was aware of the jsf lib problem before, and also I am aware of being able to alter the loading order.
The JSF libs (both of them) already were removed before, and I tried to alter the classloader order.
Alteration of the class loader order did not help.
The error still occurred, despite having done all needed steps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Weird problem,
I have an application which starts in tomcat and fails in Websphere 6, the reason seems some kind of clash between jsf-spring and the websphere 6 classloader.
If I move the code to the standard spring jsf variable resolver everything starts to work.
the problem seems to be somewhere in the jsf-spring ContextLoaderListener.
Here is the error output.
Test configuration:
MyFaces 1.1.1 and nightlies, Hibernate 3.0.5 and Spring 1.2.6
Does anyone have a clue on how to resolve this without having to change the configuration to Spring only.
0000017 SystemErr R java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at de.mindmatters.faces.spring.support.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:221)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1355)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:371)
at com.ibm.ws.webcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:114)
at com.ibm.ws.webcontainer.VirtualHost.addWebApplication(VirtualHost.java:127)
at com.ibm.ws.webcontainer.WebContainer.addWebApp(WebContainer.java:776)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:729)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:140)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:360)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1019)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1028)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:538)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:724)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:683)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:1678)
at com.ibm.ws.runtime.component.ComponentImpl$_AsynchInitializer.run(ComponentImpl.java:304)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
Werner,
WebSphere 6 comes with JSF 1.0 components. As you have included the JSF 1.1.1 libraries, you could try setting either the application or application server classloader to PARENT_LAST. This will ensure that your application classes are loaded first, prior to the relevant WebSphere classes.
Hope this helps.
charly.
Actually I was aware of the jsf lib problem before, and also I am aware of being able to alter the loading order.
The JSF libs (both of them) already were removed before, and I tried to alter the classloader order.
Alteration of the class loader order did not help.
The error still occurred, despite having done all needed steps.