You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by ur...@bluemail.ch on 2005/10/30 01:08:27 UTC

I have to add a listener class. why?

I use 1.1.1. 
In the simple app there is not entry in web.xml for a listener class.
I use JBoss and a ear file. When I use the example-config.xml file of the
simple webapp I get the error message.

java.lang.IllegalStateException: No Factories configured for this Application
- typically this is because 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>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:84)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:84)
	org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
	org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
	org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	java.lang.Thread.run(Thread.java:595)




Re: I have to add a listener class. why?

Posted by Martin Marinschek <ma...@gmail.com>.
In short, the listener is not found - Simon is absolutely right in
that with JBoss, your listener should be found automatically.

So this basically means that the MyFaces jar file is not accessible to
your container somehow - or that the tld files in the jar file cannot
be read, as the listener is read from these tld files.

The log message is misleading and has been corrected in the meantime.

regards,

Martin

On 10/30/05, urswagner@bluemail.ch <ur...@bluemail.ch> wrote:
>
> My problem is I do not understand the log entry. So the simplest was for
> me the listener in the log file.
> yonfigured for this Application
> - typically this is because 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:84)
>         at javax.faces.webapp.FacesServlet.init(FacesServlet.java:84)
>         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
>         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
> ...
>
> >-- Original-Nachricht --
> >Reply-To: "MyFaces Discussion" <us...@myfaces.apache.org>
> >Date: Sun, 30 Oct 2005 22:05:06 +1300
> >From: Simon Kitching <sk...@obsidium.com>
> >To: MyFaces Discussion <us...@myfaces.apache.org>
> >Subject: Re: I have to add a listener class. why?
> >
> >
> >urswagner@bluemail.ch wrote:
> >> I use 1.1.1.
> >> In the simple app there is not entry in web.xml for a listener class.
> >> I use JBoss and a ear file. When I use the example-config.xml file of
> the
> >> simple webapp I get the error message.
> >>
> >> java.lang.IllegalStateException: No Factories configured for this Application
> >> - typically this is because 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>
> >
> >MyFaces does need some initialisation, and this is done via a context
> >listener. However this is declared within the myfaces jar and most
> >servlet engines will detect the declaration there and insert the
> >listener automatically.
> >
> >If you are using Tomcat as the servlet engine in jboss then you do *not*
> >
> >need this listener declaration. Getting this message means that
> >something else has failed earlier in the MyFaces initialisation so check
> >
> >your logfiles.
> >
> >If you are using Resin as the servlet engine, then I believe Resin does
>
> >not support detecting/installing listeners declared within jar files so
>
> >you need to add the listener clause to your web.xml file as described in
> >
> >the error message.
> >
> >Regards,
> >
> >SImon
>
>


--

http://www.irian.at
Your JSF powerhouse -
JSF Trainings in English and German

Re: I have to add a listener class. why?

Posted by ur...@bluemail.ch.
My problem is I do not understand the log entry. So the simplest was for
me the listener in the log file.

14:16:12,329 ERROR [[/partnervermittlung]] StandardWrapper.Throwable
java.lang.IllegalStateException: No Factories configured for this Application
- typically this is because 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:84)
	at javax.faces.webapp.FacesServlet.init(FacesServlet.java:84)
	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
...

>-- Original-Nachricht --
>Reply-To: "MyFaces Discussion" <us...@myfaces.apache.org>
>Date: Sun, 30 Oct 2005 22:05:06 +1300
>From: Simon Kitching <sk...@obsidium.com>
>To: MyFaces Discussion <us...@myfaces.apache.org>
>Subject: Re: I have to add a listener class. why?
>
>
>urswagner@bluemail.ch wrote:
>> I use 1.1.1. 
>> In the simple app there is not entry in web.xml for a listener class.
>> I use JBoss and a ear file. When I use the example-config.xml file of
the
>> simple webapp I get the error message.
>> 
>> java.lang.IllegalStateException: No Factories configured for this Application
>> - typically this is because 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>
>
>MyFaces does need some initialisation, and this is done via a context 
>listener. However this is declared within the myfaces jar and most 
>servlet engines will detect the declaration there and insert the 
>listener automatically.
>
>If you are using Tomcat as the servlet engine in jboss then you do *not*
>
>need this listener declaration. Getting this message means that 
>something else has failed earlier in the MyFaces initialisation so check
>
>your logfiles.
>
>If you are using Resin as the servlet engine, then I believe Resin does

>not support detecting/installing listeners declared within jar files so

>you need to add the listener clause to your web.xml file as described in
>
>the error message.
>
>Regards,
>
>SImon


Re: I have to add a listener class. why?

Posted by Simon Kitching <sk...@obsidium.com>.
urswagner@bluemail.ch wrote:
> I use 1.1.1. 
> In the simple app there is not entry in web.xml for a listener class.
> I use JBoss and a ear file. When I use the example-config.xml file of the
> simple webapp I get the error message.
> 
> java.lang.IllegalStateException: No Factories configured for this Application
> - typically this is because 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>

MyFaces does need some initialisation, and this is done via a context 
listener. However this is declared within the myfaces jar and most 
servlet engines will detect the declaration there and insert the 
listener automatically.

If you are using Tomcat as the servlet engine in jboss then you do *not* 
need this listener declaration. Getting this message means that 
something else has failed earlier in the MyFaces initialisation so check 
your logfiles.

If you are using Resin as the servlet engine, then I believe Resin does 
not support detecting/installing listeners declared within jar files so 
you need to add the listener clause to your web.xml file as described in 
the error message.

Regards,

SImon