Hi all,
I am trying to run my JSF web-application on Resin 3.0.17. The same application runs fine in Tomcat 4.x and 5.x and I am not using anything fancy. But during deploying (that is after dropping the war and starting resin) I keep getting these errors:
[23:41:46.866] javax.servlet.ServletException: java.lang.IllegalStateException: No Factories configured for this Application - typically this is because a context listener is not setup in your web.xml.
[23:41: 46.866] A typical config looks like this;
[23:41:46.866] <listener>
[23:41:46.866] <listener-class>net.sourceforge.myfaces.webapp.StartupServletContextListener</listener-class>
[23:41:46.866] </listener>
[23:41:46.866]
[23:41:46.866] at com.caucho.server.dispatch.ServletConfigImpl.createServlet(ServletConfigImpl.java:632)
[23:41:46.866] at com.caucho.server.dispatch.ServletManager.init(ServletManager.java:152)
[23:41:46.866] at com.caucho.server.webapp.Application.start(Application.java:1599)
[23:41:46.866] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:579)
[23:41:46.866] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit (StartAutoRedeployAutoStrategy.java:72)
[23:41:46.866] at com.caucho.server.deploy.DeployController.startOnInit(DeployController.java:467)
[23:41:46.866] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java :152)
[23:41:46.866] at com.caucho.server.webapp.ApplicationContainer.start(ApplicationContainer.java:634)
[23:41:46.866] at com.caucho.server.host.Host.start(Host.java:385)
[23:41:46.866] at com.caucho.server.deploy.DeployController.startImpl (DeployController.java:579)
[23:41:46.866] at com.caucho.server.deploy.StartAutoRedeployAutoStrategy.startOnInit(StartAutoRedeployAutoStrategy.java:72)
[23:41:46.866] at com.caucho.server.deploy.DeployController.startOnInit (DeployController.java:467)
[23:41:46.866] at com.caucho.server.deploy.DeployContainer.start(DeployContainer.java:152)
[23:41:46.866] at com.caucho.server.host.HostContainer.start(HostContainer.java:467)
[23:41: 46.866] at com.caucho.server.resin.ServletServer.start(ServletServer.java:909)
[23:41:46.866] at com.caucho.server.deploy.DeployController.startImpl(DeployController.java:579)
[23:41:46.866] at com.caucho.server.deploy.AbstractDeployControllerStrategy.start (AbstractDeployControllerStrategy.java:56)
[23:41:46.866] at com.caucho.server.deploy.DeployController.start(DeployController.java:475)
[23:41:46.866] at com.caucho.server.resin.ResinServer.start(ResinServer.java:475)
[23:41:46.866] at com.caucho.server.resin.Resin.init(Resin.java)
[23:41:46.866] at com.caucho.server.resin.Resin.main(Resin.java:614)
The error seems to say that my web.xml does not have the required context-listener setup - but I have double-checked it and the web.xml does contain the listener setup exactly as shown:
Here is my web.xml in the war:
<!--*************************************-->
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd " version="2.4">
<display-name>GSE</display-name>
<!-- Define the basename for a resource bundle for I18N -->
<filter>
<filter-name>sitemesh</filter-name>
<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext*.xml</param-value>
</context-param>
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener </listener-class>
</listener>
<listener>
<listener-class>net.sourceforge.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>faces</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>faces</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/404.jsp</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error.jsp</location>
</error-page>
</web-app>
<!--*************************************-->
Has anybody got JSF to run on Resin 3.x before?? I will really appreciate if anyone can let me know how I can resolve this issue.
--
Thanks and best regards,
Anoop