the mentioned jetty version is fine ;-)
On 7/25/07, Martin Marinschek <[EMAIL PROTECTED]> wrote:
Hi guys,
the StartupServletContextListener should automatically be run by the servlet
container when it parses the tld.
What you can do as a workaround:
- declare the context-listener as explained in the stacktrace in your
web.xml
- use the MyFacesServlet instead of the FacesServlet
In any case, make sure that the work and temp directories of the Tomcat are
cleared, and that you have the MyFaces libraries available only in one
version.
I have had this problem quite often now - especially in Tomcat, and I'm
quite desperate to find a solution for this.
regards,
Martin
On 7/25/07, Wolf Benz <[EMAIL PROTECTED]> wrote:
> Indeed - and this is what made things already better for me - before (2.5
& 1.2 versions), I had weird startup errors. --> for the time being: better
stick with versions 2.4 & 1.1 :-)
> -Wolf
>
>
>
> On 7/25/07, ncheltsov <[EMAIL PROTECTED]> wrote:
> >
> > Hi, as much as I see, both documents are, like you say: 2.4 & 1.1?
> >
> >
> > Wolf Benz wrote:
> > Sorry -
> > Look at the top of the 2 docs you cite: it refers to the version the
document conforms to.
> > At first I thought: I'm building a JSF1.2 app so I state: servlet v.
2.5(web.xml) & JSF-version 1.2 (in faces-config top)
> > Yet, to my surprise, this gave me problems...
> > Changed them back to 2.4 & 1.1 and the problems were gone.
> > If you look at the demo apps Werner put online this morning, you'll see
he also references 2.4 & 1.1
> >
> >
> > The "why" for this failure is not clear to me. As you state yourself: it
shouldn't be like this, it really should be 2.5 & 1.2...
> >
> >
> > OK like this?
> > -Wolf
> >
> >
> > On 7/24/07, ncheltsov <[EMAIL PROTECTED] > wrote:
> > >
> > > Hi, I don't really understand what you are saying! Can you give more
explanations?
> > > I need to use JSF version 1.2, not 1.1.
> > >
> > >
> > > Wolf Benz wrote:
> > > On Tomcat I had this too at first.
> > > Then I changed
> > > - in the web.xml the web app xsd version from 2.5 to 2.4, and
> > > - in faces-config.xml the JSF version from 1.2 to 1.1
> > > ... and the problem was solved... !
> > >
> > >
> > > The bleeb part is... it really should be 2.5 and 1.2, yet this gave me
errors...
> > > Are the URLs wrong/not yet online (--> would SYSTEM & have the files
locally solve the problem?)
> > >
> > >
> > > & @Matthias: is the StartupServletContextListener still necessary to
declare in the web.xml?
> > >
> > >
> > > -Wolf
> > >
> > >
> > > On 7/24/07, Matthias Wessendorf <[EMAIL PROTECTED] > wrote:
> > > > can you try this jetty version:
> > > >
> > > > <version>6.1.2rc0</version>
> > > >
> > > >
> > > >
> > > > On 7/24/07, ncheltsov <[EMAIL PROTECTED]> 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.IllegalStateExceptio n: 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.headerComple
te(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.HttpConnecti on.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/XMLSche ma-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.
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Matthias Wessendorf
> > > >
> > > > further stuff:
> > > > blog: http://matthiaswessendorf.wordpress.com/
> > > > mail: matzew-at-apache-dot-org
> > > >
> > >
> > >
> > >
> >
> >
> >
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
--
Matthias Wessendorf
further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org