You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Fletcher, Michael (Calgary)" <MF...@petro-canada.ca> on 2007/05/04 18:42:21 UTC

"No Factories configured for this Application" with Tomcat 5.5.23

Hello

I was having trouble getting with JSF because of this error described
below.  I tried using my code as well as the
tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
as well as the correction described below.

Eventually I just tried the examples using Tomcat 5.0.28 and everything
worked correctly.


Is there a known issue with Tomcat 5.5.23 and MyFaces?



javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

ROOT CAUSE

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;
<listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>
</listener>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

 
Michael Fletcher
p: 403-296-4215
 
--------------------------------------------------------

This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and If you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.  We honour similar requests relating to the privacy of email communications.
 
Cette communication par courrier electronique est une communication privee a l'usage exclusif du destinataire principal ainsi que des personnes dont les noms figurent en copie.  Les renseignements contenus dans ce courriel sont confidentiels et si vous n'etes pas le destinataire prevu, vous etes avise, par les presentes que toute reproduction, transfert ou autre forme de diffusion de cette communication par quelque moyen que ce soit est interdite.  Si vous n'etes pas specifiquement autorise a recevoir ce courriel ou si vous croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original immediatement.  Nous respectons les demandes similaires qui touchent la confidentialite des communications par courrier electronique.

Re: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by Simon Lessard <si...@gmail.com>.
The listener is NOT in web.xml, it's located within MyFaces' TLD, which is
his problem. I don't remember which versions of Tomcat and MyFaces it was,
but Tomcat was not executing the listener and I had to declare the listener
in web.xml as suggested in the exception's message which is the correct way
to fix it.


Regards,

~ Simon (the other one :) )

On 5/6/07, Simon Kitching <si...@rhe.co.nz> wrote:
>
> Hi Michael,
>
> Fletcher, Michael (Calgary) wrote:
> > I was having trouble getting with JSF because of this error described
> > below.  I tried using my code as well as the
> > tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
> > as well as the correction described below.
> >
> > Eventually I just tried the examples using Tomcat 5.0.28 and everything
> > worked correctly.
> >
> >
> > Is there a known issue with Tomcat 5.5.23 and MyFaces?
> >
> >
> > ROOT CAUSE
> >
> > 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;
> > <listener>
> >
> > <listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
> > /listener-class>
> > </listener>
> >
>
> There are no known problems like this, and they would certainly be
> noticed! I cannot imagine tomcat5.5 not executing a servlet-listener
> registered in its web.xml file...
>
> It sure looks like you haven't followed the instructions in the error
> message about defining StartupServletContextListener. Maybe you have the
> block present in your web.xml but it is commented out or something?
>

RE: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by he...@dnbnor.no.
Hi

I have done extensive testing with various versions of Tomcat, and MyFaces does not work on anything above 5.5.17 running on Java 5 (On 1.4 it works). From what I have seen, I think this may have something todo with locale. I have not had the time yet to debug the startup, but I think that there is an Exception that is not logged that makes the initialization fail.

Hermod

-----Original Message-----
From: Simon Kitching [mailto:simon.kitching@rhe.co.nz]
Sent: Sunday, May 06, 2007 10:33 PM
To: MyFaces Discussion
Subject: Re: "No Factories configured for this Application" with Tomcat
5.5.23


Hi Michael,

Fletcher, Michael (Calgary) wrote:
> I was having trouble getting with JSF because of this error described
> below.  I tried using my code as well as the
> tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
> as well as the correction described below.
> 
> Eventually I just tried the examples using Tomcat 5.0.28 and everything
> worked correctly.
> 
> 
> Is there a known issue with Tomcat 5.5.23 and MyFaces?
> 
> 
> ROOT CAUSE
> 
> 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;
> <listener>
>  
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
> /listener-class>
> </listener>
> 	

There are no known problems like this, and they would certainly be 
noticed! I cannot imagine tomcat5.5 not executing a servlet-listener 
registered in its web.xml file...

It sure looks like you haven't followed the instructions in the error 
message about defining StartupServletContextListener. Maybe you have the 
block present in your web.xml but it is commented out or something?
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Re: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by Simon Kitching <si...@rhe.co.nz>.
Hi Michael,

Fletcher, Michael (Calgary) wrote:
> I was having trouble getting with JSF because of this error described
> below.  I tried using my code as well as the
> tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
> as well as the correction described below.
> 
> Eventually I just tried the examples using Tomcat 5.0.28 and everything
> worked correctly.
> 
> 
> Is there a known issue with Tomcat 5.5.23 and MyFaces?
> 
> 
> ROOT CAUSE
> 
> 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;
> <listener>
>  
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
> /listener-class>
> </listener>
> 	

There are no known problems like this, and they would certainly be 
noticed! I cannot imagine tomcat5.5 not executing a servlet-listener 
registered in its web.xml file...

It sure looks like you haven't followed the instructions in the error 
message about defining StartupServletContextListener. Maybe you have the 
block present in your web.xml but it is commented out or something?

RE: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by "Fletcher, Michael (Calgary)" <MF...@petro-canada.ca>.
FYI

I submitted bug #42354 and it has been fixed in SVN.  The fix will be
included with 5.5.24. 

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no] 
Sent: Monday, May 07, 2007 11:49 PM
To: users@myfaces.apache.org
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23

Hi

And this is something that was introduced post 5.5.17 since it works for
that one with spaces in the name.

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Monday, May 07, 2007 10:36 PM
To: MyFaces Discussion
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23


I have found the problem in Tomcat's code.  It all reduced to a problem
with spaces and %20's.  You can read more about it below if you like.

My next question is how should I send this problem to the Tomcat guys.
Are there any on this list?  I could either create a bug or submit it to
the devel list.


I attached the debugger and looked at what was happenening.  I think I
found the problem.  Or at least a direction towards the problem.

The method getJarPaths in TldConfig.java (in Tomcat) is supposed to
return all of the JAR's that a web application has.  This block of code
is executed for each JAR in the WEB-INF/lib folder.

				 File file = new
File(urls[i].getFile());
                    try {
                        file = file.getCanonicalFile();
                    } catch (IOException e) {
                        // Ignore
                    }
                    if (!file.exists()) {
                        continue;
                    }

Each JAR file is being ignored because the "!file.exists()" call returns
false.  Each path has the a value like
"c:\Documents%20and%20Settings\mfletche\...".  Java does not seem able
to convert %20 to a space and is thus claiming the file does not exist.

When I moved webapp to a folder without a space it corrected the
problem.

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no]
Sent: Monday, May 07, 2007 4:34 AM
To: users@myfaces.apache.org
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23

Hi

Anything above 5.5.17 does not work (I have done a test on all 5.5.x). 

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Friday, May 04, 2007 6:42 PM
To: users@myfaces.apache.org
Subject: "No Factories configured for this Application" with Tomcat
5.5.23


Hello

I was having trouble getting with JSF because of this error described
below.  I tried using my code as well as the
tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
as well as the correction described below.

Eventually I just tried the examples using Tomcat 5.0.28 and everything
worked correctly.


Is there a known issue with Tomcat 5.5.23 and MyFaces?



javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

ROOT CAUSE

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;
<listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>
</listener>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

 
Michael Fletcher
p: 403-296-4215
 
--------------------------------------------------------

This email communication is intended as a private communication for the
sole use of the primary addressee and those individuals listed for
copies in the original message. The information contained in this email
is private and confidential and If you are not an intended recipient you
are hereby notified that copying, forwarding or other dissemination or
distribution of this communication by any means is prohibited.  If you
are not specifically authorized to receive this email and if you believe
that you received it in error please notify the original sender
immediately.  We honour similar requests relating to the privacy of
email communications.
 
Cette communication par courrier electronique est une communication
privee a l'usage exclusif du destinataire principal ainsi que des
personnes dont les noms figurent en copie.  Les renseignements contenus
dans ce courriel sont confidentiels et si vous n'etes pas le
destinataire prevu, vous etes avise, par les presentes que toute
reproduction, transfert ou autre forme de diffusion de cette
communication par quelque moyen que ce soit est interdite.  Si vous
n'etes pas specifiquement autorise a recevoir ce courriel ou si vous
croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original
immediatement.  Nous respectons les demandes similaires qui touchent la
confidentialite des communications par courrier electronique.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR
Group cannot accept any payment orders or other legally binding
correspondence with customers as a part of an email. 

This email message has been virus checked by the anti virus programs
used in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR
Group cannot accept any payment orders or other legally binding
correspondence with customers as a part of an email. 

This email message has been virus checked by the anti virus programs
used in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

RE: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by he...@dnbnor.no.
Hi

And this is something that was introduced post 5.5.17 since it works for that one with spaces in the name.

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Monday, May 07, 2007 10:36 PM
To: MyFaces Discussion
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23


I have found the problem in Tomcat's code.  It all reduced to a problem
with spaces and %20's.  You can read more about it below if you like.

My next question is how should I send this problem to the Tomcat guys.
Are there any on this list?  I could either create a bug or submit it to
the devel list.


I attached the debugger and looked at what was happenening.  I think I
found the problem.  Or at least a direction towards the problem.

The method getJarPaths in TldConfig.java (in Tomcat) is supposed to
return all of the JAR's that a web application has.  This block of code
is executed for each JAR in the WEB-INF/lib folder.

				 File file = new
File(urls[i].getFile());
                    try {
                        file = file.getCanonicalFile();
                    } catch (IOException e) {
                        // Ignore
                    }
                    if (!file.exists()) {
                        continue;
                    }

Each JAR file is being ignored because the "!file.exists()" call returns
false.  Each path has the a value like
"c:\Documents%20and%20Settings\mfletche\...".  Java does not seem able
to convert %20 to a space and is thus claiming the file does not exist.

When I moved webapp to a folder without a space it corrected the
problem.

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no] 
Sent: Monday, May 07, 2007 4:34 AM
To: users@myfaces.apache.org
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23

Hi

Anything above 5.5.17 does not work (I have done a test on all 5.5.x). 

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Friday, May 04, 2007 6:42 PM
To: users@myfaces.apache.org
Subject: "No Factories configured for this Application" with Tomcat
5.5.23


Hello

I was having trouble getting with JSF because of this error described
below.  I tried using my code as well as the
tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
as well as the correction described below.

Eventually I just tried the examples using Tomcat 5.0.28 and everything
worked correctly.


Is there a known issue with Tomcat 5.5.23 and MyFaces?



javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

ROOT CAUSE

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;
<listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>
</listener>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

 
Michael Fletcher
p: 403-296-4215
 
--------------------------------------------------------

This email communication is intended as a private communication for the
sole use of the primary addressee and those individuals listed for
copies in the original message. The information contained in this email
is private and confidential and If you are not an intended recipient you
are hereby notified that copying, forwarding or other dissemination or
distribution of this communication by any means is prohibited.  If you
are not specifically authorized to receive this email and if you believe
that you received it in error please notify the original sender
immediately.  We honour similar requests relating to the privacy of
email communications.
 
Cette communication par courrier electronique est une communication
privee a l'usage exclusif du destinataire principal ainsi que des
personnes dont les noms figurent en copie.  Les renseignements contenus
dans ce courriel sont confidentiels et si vous n'etes pas le
destinataire prevu, vous etes avise, par les presentes que toute
reproduction, transfert ou autre forme de diffusion de cette
communication par quelque moyen que ce soit est interdite.  Si vous
n'etes pas specifiquement autorise a recevoir ce courriel ou si vous
croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original
immediatement.  Nous respectons les demandes similaires qui touchent la
confidentialite des communications par courrier electronique.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR
Group cannot accept any payment orders or other legally binding
correspondence with customers as a part of an email. 

This email message has been virus checked by the anti virus programs
used in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

RE: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by "Fletcher, Michael (Calgary)" <MF...@petro-canada.ca>.
I have found the problem in Tomcat's code.  It all reduced to a problem
with spaces and %20's.  You can read more about it below if you like.

My next question is how should I send this problem to the Tomcat guys.
Are there any on this list?  I could either create a bug or submit it to
the devel list.


I attached the debugger and looked at what was happenening.  I think I
found the problem.  Or at least a direction towards the problem.

The method getJarPaths in TldConfig.java (in Tomcat) is supposed to
return all of the JAR's that a web application has.  This block of code
is executed for each JAR in the WEB-INF/lib folder.

				 File file = new
File(urls[i].getFile());
                    try {
                        file = file.getCanonicalFile();
                    } catch (IOException e) {
                        // Ignore
                    }
                    if (!file.exists()) {
                        continue;
                    }

Each JAR file is being ignored because the "!file.exists()" call returns
false.  Each path has the a value like
"c:\Documents%20and%20Settings\mfletche\...".  Java does not seem able
to convert %20 to a space and is thus claiming the file does not exist.

When I moved webapp to a folder without a space it corrected the
problem.

-----Original Message-----
From: hermod.opstvedt@dnbnor.no [mailto:hermod.opstvedt@dnbnor.no] 
Sent: Monday, May 07, 2007 4:34 AM
To: users@myfaces.apache.org
Subject: RE: "No Factories configured for this Application" with Tomcat
5.5.23

Hi

Anything above 5.5.17 does not work (I have done a test on all 5.5.x). 

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Friday, May 04, 2007 6:42 PM
To: users@myfaces.apache.org
Subject: "No Factories configured for this Application" with Tomcat
5.5.23


Hello

I was having trouble getting with JSF because of this error described
below.  I tried using my code as well as the
tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
as well as the correction described below.

Eventually I just tried the examples using Tomcat 5.0.28 and everything
worked correctly.


Is there a known issue with Tomcat 5.5.23 and MyFaces?



javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

ROOT CAUSE

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;
<listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>
</listener>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

 
Michael Fletcher
p: 403-296-4215
 
--------------------------------------------------------

This email communication is intended as a private communication for the
sole use of the primary addressee and those individuals listed for
copies in the original message. The information contained in this email
is private and confidential and If you are not an intended recipient you
are hereby notified that copying, forwarding or other dissemination or
distribution of this communication by any means is prohibited.  If you
are not specifically authorized to receive this email and if you believe
that you received it in error please notify the original sender
immediately.  We honour similar requests relating to the privacy of
email communications.
 
Cette communication par courrier electronique est une communication
privee a l'usage exclusif du destinataire principal ainsi que des
personnes dont les noms figurent en copie.  Les renseignements contenus
dans ce courriel sont confidentiels et si vous n'etes pas le
destinataire prevu, vous etes avise, par les presentes que toute
reproduction, transfert ou autre forme de diffusion de cette
communication par quelque moyen que ce soit est interdite.  Si vous
n'etes pas specifiquement autorise a recevoir ce courriel ou si vous
croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original
immediatement.  Nous respectons les demandes similaires qui touchent la
confidentialite des communications par courrier electronique.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR
Group cannot accept any payment orders or other legally binding
correspondence with customers as a part of an email. 

This email message has been virus checked by the anti virus programs
used in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *

RE: "No Factories configured for this Application" with Tomcat 5.5.23

Posted by he...@dnbnor.no.
Hi

Anything above 5.5.17 does not work (I have done a test on all 5.5.x). 

Hermod

-----Original Message-----
From: Fletcher, Michael (Calgary) [mailto:MFletche@petro-canada.ca]
Sent: Friday, May 04, 2007 6:42 PM
To: users@myfaces.apache.org
Subject: "No Factories configured for this Application" with Tomcat
5.5.23


Hello

I was having trouble getting with JSF because of this error described
below.  I tried using my code as well as the
tomahawk-examples-1.1.5-bin.zip.  I tried removing different WAR files
as well as the correction described below.

Eventually I just tried the examples using Tomcat 5.0.28 and everything
worked correctly.


Is there a known issue with Tomcat 5.5.23 and MyFaces?



javax.servlet.ServletException: Servlet.init() for servlet Faces Servlet
threw exception
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

ROOT CAUSE

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;
<listener>
 
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener<
/listener-class>
</listener>

	javax.faces.FactoryFinder.getFactory(FactoryFinder.java:93)
	javax.faces.webapp.FacesServlet.init(FacesServlet.java:91)
	
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:117)
	
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
51)
	
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:87
0)
	
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:665)
	
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:528)
	
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:81)
	
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:685)
	java.lang.Thread.run(Thread.java:619)

 
Michael Fletcher
p: 403-296-4215
 
--------------------------------------------------------

This email communication is intended as a private communication for the sole use of the primary addressee and those individuals listed for copies in the original message. The information contained in this email is private and confidential and If you are not an intended recipient you are hereby notified that copying, forwarding or other dissemination or distribution of this communication by any means is prohibited.  If you are not specifically authorized to receive this email and if you believe that you received it in error please notify the original sender immediately.  We honour similar requests relating to the privacy of email communications.
 
Cette communication par courrier electronique est une communication privee a l'usage exclusif du destinataire principal ainsi que des personnes dont les noms figurent en copie.  Les renseignements contenus dans ce courriel sont confidentiels et si vous n'etes pas le destinataire prevu, vous etes avise, par les presentes que toute reproduction, transfert ou autre forme de diffusion de cette communication par quelque moyen que ce soit est interdite.  Si vous n'etes pas specifiquement autorise a recevoir ce courriel ou si vous croyez l'avoir recu par erreur, veuillez en aviser l'expediteur original immediatement.  Nous respectons les demandes similaires qui touchent la confidentialite des communications par courrier electronique.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the anti virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *