myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ncheltsov <nchelt...@obs.bg>
Subject Re: myFaces 1.2 problem
Date Tue, 24 Jul 2007 17:19:14 GMT
Hi, the problem is, that it is not only on jetty but on  JBoss too. And 
the problem is similar when I am using sun faces not only mafaces. Or  
at least it seems like this.

Matthias Wessendorf wrote:
> can you try this jetty version:
>
> <version>6.1.2rc0</version>
>
>
>
> On 7/24/07, ncheltsov <ncheltsov@obs.bg> wrote:
>>
>>  Hi, I am trying to use myfaces 1.2 and I have the following error:
>>
>>  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>
>>
>>
>>
>> Caused by: 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;
>> org.apache.myfaces.webapp.StartupServletContextListener at
>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
>> at
>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:88)
>> at
>> org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) 
>>
>> at
>> org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:342) 
>>
>> at
>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:463)
>> at
>> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
>> at
>> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) 
>>
>> at
>> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>> at
>> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>> at
>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>> at
>> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)

>>
>> at
>> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) 
>>
>> at
>> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>> at org.mortbay.jetty.Server.handle(Server.java:313) at
>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>> at
>> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)

>>
>> at
>> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>> at
>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>> at
>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>> at
>> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) 
>>
>> at
>> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) 
>>
>>  I am using maven-jetty-plugin 6.1.5. I don't know what stays behind 
>> this
>> plugin, but when I try to use JBoss-4.2 I
>> got the similar exception:
>>
>> [INFO] [talledLocalContainer] java.lang.IllegalStateException: 
>> Application
>> was not properly initialized at startup, could not find Factor
>> y: javax.faces.application.ApplicationFactory
>> [INFO] [talledLocalContainer] at
>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:256)
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.config.ConfigureListener$InitFacesContext.getApplication(ConfigureListener.java:1614)

>>
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.util.MessageFactory.getApplication(MessageFactory.java:255) 
>>
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:144)
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:122)
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)

>>
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.config.ConfigureListener.digester(ConfigureListener.java:1180) 
>>
>> [INFO] [talledLocalContainer] at
>> com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:297)

>>
>> [INFO] [talledLocalContainer] at
>> org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureLis

>>
>>
>> I tried everything and nothing helps. I tried to look in Internet, 
>> without
>> any result. Since the problem is reproduced on different
>> servers I began to thing, that this is the problem in JSF 1.2
>>
>>  my web.xml is classical:
>>
>>  <?xml version="1.0"?>
>>  <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>Hardware Tracing System</display-name>
>>      <description>Hardware Tracing System</description>
>>
>>     <listener>
>>         <listener-class>
>>
>> org.apache.myfaces.webapp.StartupServletContextListener
>>         </listener-class>
>>     </listener>
>>
>>     <servlet>
>>        <servlet-name>javax.faces.FacesServlet</servlet-name>
>>        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>
>>     </servlet>
>>
>>     <servlet-mapping>
>>        <servlet-name>javax.faces.FacesServlet</servlet-name>
>>        <url-pattern>*.jsf</url-pattern>
>>     </servlet-mapping>
>>
>>      <!-- Welcome files -->
>>      <welcome-file-list>
>>          <welcome-file>helloWorld.jsf</welcome-file>
>>      </welcome-file-list>
>>
>>  </web-app>
>>
>>  my faces-config.xml also:
>>
>>  <?xml version="1.0"?>
>>
>>  <!DOCTYPE faces-config PUBLIC
>>    "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN"
>>    "http://java.sun.com/dtd/web-facesconfig_1_1.dtd" >
>>
>>  <faces-config>
>>
>>      <!-- managed beans of the simple hello world app -->
>>      <managed-bean>
>>
>> <managed-bean-name>helloWorldBacking</managed-bean-name>
>>
>> <managed-bean-class>bg.obs.hts.HelloWorldBacking</managed-bean-class>
>>          <managed-bean-scope>request</managed-bean-scope>
>>      </managed-bean>
>>
>>      <!-- navigation rules for helloWorld.jsp -->
>>      <navigation-rule>
>>          <from-view-id>/helloWorld.jsp</from-view-id>
>>          <navigation-case>
>>              <from-outcome>success</from-outcome>
>>              <to-view-id>/helloWorld.jsp</to-view-id>
>>          </navigation-case>
>>      </navigation-rule>
>>  </faces-config>
>>
>>  Where the bleep is the problem. Any Idea.
>>
>>
>
>


Mime
View raw message