webtier@glassfish.java.net

Mojarra 2.0.2 and jetty 7.0.1

From: <webtier_at_javadesktop.org>
Date: Mon, 18 Jan 2010 05:58:26 PST

I use jetty as embedded server and mojarra as jsf 2.0 implementation.
I get the following exception:
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:306)
        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:166)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:421)
        at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:245)
by server start.

Here is my web.xml
<?xml version="1.0"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
</web-app>

If i replace mojarra with myfaces 1.2.7 (JSF 1.2) and adding a listener for myfaces
<listener>
  <listener-class>
     org.apache.myfaces.webapp.StartupServletContextListener
  </listener-class>
</listener>
Then i can start the jetty server without any problem. Therefore i think the problem is by the configuration of mojarra.
Thank in advance for any help
[Message sent by forum member 'thang_and_go' (thang.trinh_at_gmx.de)]

http://forums.java.net/jive/thread.jspa?messageID=381544