myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Lessard" <simon.lessar...@gmail.com>
Subject Re: Very slow Tomcat 6 startup when using MyFaces 1.2.0
Date Tue, 14 Aug 2007 18:17:27 GMT
Hello Jan-Kees,

The following section in your stack trace is the key:

*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>


It seems that Tomcat still has the bug where it cannot execute the servlet
context listener defined in myfaces' tld. Try to manually set the listener
in your web.xml.


Regards,

~ Simon


On 8/14/07, Jan-Kees van Andel <jkvandel@planet.nl> wrote:
>
>  Hi there,
>
>
>
> Recently, I tried the new MyFaces (1.2.0), together with some other
> libraries. Everything works well, except that the server is starting up
> reeeaaaallyyyy slow. Sometimes it just takes seconds, but most of the time
> it takes minutes when it throws an Exception because of a timeout. The
> startup log is shown below:
>
>
>
> 14-aug-2007 19:42:03 org.apache.catalina.core.AprLifecycleListener init
>
> INFO: The Apache Tomcat Native library which allows optimal performance in
> production environments was not found on the java.library.path:
> D:\dev\Java\jdk1.6.0_01\bin;D:\dev\appsrv\apache-tomcat-6.0.13\bin
>
> 14-aug-2007 19:42:03 org.apache.coyote.http11.Http11Protocol init
>
> INFO: Initializing Coyote HTTP/1.1 on http-8080
>
> 14-aug-2007 19:42:03 org.apache.catalina.startup.Catalina load
>
> INFO: Initialization processed in 457 ms
>
> 14-aug-2007 19:42:03 org.apache.catalina.core.StandardService start
>
> INFO: Starting service Catalina
>
> 14-aug-2007 19:42:03 org.apache.catalina.core.StandardEngine start
>
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.13
>
> 14-aug-2007 19:42:05 org.apache.myfaces.config.FacesConfiguratorfeedStandardConfig
>
> INFO: Reading standard config META-INF/standard-faces-config.xml
>
> 14-aug-2007 19:42:05 org.apache.myfaces.config.FacesConfiguratorfeedClassloaderConfigurations
>
> INFO: Reading config jar:file:/D:/dev/appsrv/apache-tomcat-6.0.13
> /temp/0-mblf/WEB-INF/lib/ajax4jsf-1.0.6.jar!/META-INF/faces-config.xml
>
> 14-aug-2007 19:42:19 org.apache.myfaces.config.FacesConfiguratorfeedClassloaderConfigurations
>
> INFO: Reading config jar:file:/D:/dev/appsrv/apache-tomcat-6.0.13
> /temp/0-mblf/WEB-INF/lib/jsf-
> facelets-1.1.11.jar!/META-INF/faces-config.xml
>
> 14-aug-2007 19:52:28 org.apache.myfaces.webapp.DefaultFacesInitializerinitFaces
>
> SEVERE: Error initializing MyFaces: *java.net.SocketException*: Connection
> reset
>
> *javax.faces.FacesException*: *java.net.SocketException*: Connection reset
>
>       at
> org.apache.myfaces.config.FacesConfigurator.feedClassloaderConfigurations(
> *FacesConfigurator.java:425*)
>
>       at org.apache.myfaces.config.FacesConfigurator.configure(*
> FacesConfigurator.java:171*)
>
>       at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(*
> DefaultFacesInitializer.java:112*)
>
>       at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized
> (*StartupServletContextListener.java:57*)
>
>       at org.apache.catalina.core.StandardContext.listenerStart(*
> StandardContext.java:3827*)
>
>       at org.apache.catalina.core.StandardContext.start(*
> StandardContext.java:4334*)
>
>       at org.apache.catalina.core.ContainerBase.addChildInternal(*
> ContainerBase.java:791*)
>
>       at org.apache.catalina.core.ContainerBase.addChild(*
> ContainerBase.java:771*)
>
>       at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java
> :525*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptor(*
> HostConfig.java:626*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptors(*
> HostConfig.java:553*)
>
>       at org.apache.catalina.startup.HostConfig.deployApps(*
> HostConfig.java:488*)
>
>       at org.apache.catalina.startup.HostConfig.start(*HostConfig.java
> :1138*)
>
>       at org.apache.catalina.startup.HostConfig.lifecycleEvent(*
> HostConfig.java:311*)
>
>       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> LifecycleSupport.java:117*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1053*)
>
>       at org.apache.catalina.core.StandardHost.start(*StandardHost.java
> :719*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1045*)
>
>       at org.apache.catalina.core.StandardEngine.start(*
> StandardEngine.java:443*)
>
>       at org.apache.catalina.core.StandardService.start(*
> StandardService.java:516*)
>
>       at org.apache.catalina.core.StandardServer.start(*
> StandardServer.java:710*)
>
>       at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke(*
> NativeMethodAccessorImpl.java:39*)
>
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
> DelegatingMethodAccessorImpl.java:25*)
>
>       at java.lang.reflect.Method.invoke(*Method.java:597*)
>
>       at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
>
>       at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
>
> Caused by: *java.net.SocketException*: Connection reset
>
>       at java.net.SocketInputStream.read(*SocketInputStream.java:168*)
>
>       at java.io.BufferedInputStream.read1(*BufferedInputStream.java:256*)
>
>       at java.io.BufferedInputStream.read(*BufferedInputStream.java:317*)
>
>       at sun.net.www.MeteredStream.read(*MeteredStream.java:116*)
>
>       at java.io.FilterInputStream.read(*FilterInputStream.java:116*)
>
>       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(
> *HttpURLConnection.java:2364*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStream.read
> (*XMLEntityManager.java:2940*)
>
>       at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(*
> UTF8Reader.java:292*)
>
>       at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(*
> XMLEntityScanner.java:1742*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(*
> XMLEntityScanner.java:1543*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.skipSeparator(*
> XMLDTDScannerImpl.java:2055*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanAttlistDecl(
> *XMLDTDScannerImpl.java:1187*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls(*
> XMLDTDScannerImpl.java:1983*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSubset
> (*XMLDTDScannerImpl.java:320*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch
> (*XMLDocumentScannerImpl.java:1177*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next
> (*XMLDocumentScannerImpl.java:1068*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next
> (*XMLDocumentScannerImpl.java:988*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(*
> XMLDocumentScannerImpl.java:645*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(*
> XMLNSDocumentScannerImpl.java:140*)
>
>       at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument
> (*XMLDocumentFragmentScannerImpl.java:508*)
>
>       at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(*
> XML11Configuration.java:807*)
>
>       at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(*
> XML11Configuration.java:737*)
>
>       at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(*
> XMLParser.java:107*)
>
>       at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(*
> AbstractSAXParser.java:1205*)
>
>       at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(
> *SAXParserImpl.java:522*)
>
>       at org.apache.commons.digester.Digester.parse(*Digester.java:1745*)
>
>       at
> org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig
> (*DigesterFacesConfigUnmarshallerImpl.java:194*)
>
>       at
> org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.getFacesConfig
> (*DigesterFacesConfigUnmarshallerImpl.java:34*)
>
>       at
> org.apache.myfaces.config.FacesConfigurator.feedClassloaderConfigurations(
> *FacesConfigurator.java:419*)
>
>       ... 27 more
>
> 14-aug-2007 19:52:28 org.apache.catalina.core.ApplicationContext log
>
> SEVERE: StandardWrapper.Throwable
>
> *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>
>
>
>
>       at javax.faces.FactoryFinder.getFactory(*FactoryFinder.java:90*)
>
>       at javax.faces.webapp.FacesServlet.init(*FacesServlet.java:88*)
>
>       at org.apache.catalina.core.StandardWrapper.loadServlet(*
> StandardWrapper.java:1161*)
>
>       at org.apache.catalina.core.StandardWrapper.load(*
> StandardWrapper.java:981*)
>
>       at org.apache.catalina.core.StandardContext.loadOnStartup(*
> StandardContext.java:4042*)
>
>       at org.apache.catalina.core.StandardContext.start(*
> StandardContext.java:4348*)
>
>       at org.apache.catalina.core.ContainerBase.addChildInternal(*
> ContainerBase.java:791*)
>
>       at org.apache.catalina.core.ContainerBase.addChild(*
> ContainerBase.java:771*)
>
>       at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java
> :525*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptor(*
> HostConfig.java:626*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptors(*
> HostConfig.java:553*)
>
>       at org.apache.catalina.startup.HostConfig.deployApps(*
> HostConfig.java:488*)
>
>       at org.apache.catalina.startup.HostConfig.start(*HostConfig.java
> :1138*)
>
>       at org.apache.catalina.startup.HostConfig.lifecycleEvent(*
> HostConfig.java:311*)
>
>       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> LifecycleSupport.java:117*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1053*)
>
>       at org.apache.catalina.core.StandardHost.start(*StandardHost.java
> :719*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1045*)
>
>       at org.apache.catalina.core.StandardEngine.start(*
> StandardEngine.java:443*)
>
>       at org.apache.catalina.core.StandardService.start(*
> StandardService.java:516*)
>
>       at org.apache.catalina.core.StandardServer.start(*
> StandardServer.java:710*)
>
>       at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke(*
> NativeMethodAccessorImpl.java:39*)
>
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
> DelegatingMethodAccessorImpl.java:25*)
>
>       at java.lang.reflect.Method.invoke(*Method.java:597*)
>
>       at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
>
>       at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
>
> 14-aug-2007 19:52:28 org.apache.catalina.core.StandardContextloadOnStartup
>
> SEVERE: Servlet /mblf threw load() exception
>
> *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>
>
>
>
>       at javax.faces.FactoryFinder.getFactory(*FactoryFinder.java:90*)
>
>       at javax.faces.webapp.FacesServlet.init(*FacesServlet.java:88*)
>
>       at org.apache.catalina.core.StandardWrapper.loadServlet(*
> StandardWrapper.java:1161*)
>
>       at org.apache.catalina.core.StandardWrapper.load(*
> StandardWrapper.java:981*)
>
>       at org.apache.catalina.core.StandardContext.loadOnStartup(*
> StandardContext.java:4042*)
>
>       at org.apache.catalina.core.StandardContext.start(*
> StandardContext.java:4348*)
>
>       at org.apache.catalina.core.ContainerBase.addChildInternal(*
> ContainerBase.java:791*)
>
>       at org.apache.catalina.core.ContainerBase.addChild(*
> ContainerBase.java:771*)
>
>       at org.apache.catalina.core.StandardHost.addChild(*StandardHost.java
> :525*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptor(*
> HostConfig.java:626*)
>
>       at org.apache.catalina.startup.HostConfig.deployDescriptors(*
> HostConfig.java:553*)
>
>       at org.apache.catalina.startup.HostConfig.deployApps(*
> HostConfig.java:488*)
>
>       at org.apache.catalina.startup.HostConfig.start(*HostConfig.java
> :1138*)
>
>       at org.apache.catalina.startup.HostConfig.lifecycleEvent(*
> HostConfig.java:311*)
>
>       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(*
> LifecycleSupport.java:117*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1053*)
>
>       at org.apache.catalina.core.StandardHost.start(*StandardHost.java
> :719*)
>
>       at org.apache.catalina.core.ContainerBase.start(*ContainerBase.java
> :1045*)
>
>       at org.apache.catalina.core.StandardEngine.start(*
> StandardEngine.java:443*)
>
>       at org.apache.catalina.core.StandardService.start(*
> StandardService.java:516*)
>
>       at org.apache.catalina.core.StandardServer.start(*
> StandardServer.java:710*)
>
>       at org.apache.catalina.startup.Catalina.start(*Catalina.java:566*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)
>
>       at sun.reflect.NativeMethodAccessorImpl.invoke(*
> NativeMethodAccessorImpl.java:39*)
>
>       at sun.reflect.DelegatingMethodAccessorImpl.invoke(*
> DelegatingMethodAccessorImpl.java:25*)
>
>       at java.lang.reflect.Method.invoke(*Method.java:597*)
>
>       at org.apache.catalina.startup.Bootstrap.start(*Bootstrap.java:288*)
>
>       at org.apache.catalina.startup.Bootstrap.main(*Bootstrap.java:413*)
>
> 14-aug-2007 19:52:29 org.apache.catalina.core.ApplicationContext log
>
> INFO: ContextListener: contextInitialized()
>
> 14-aug-2007 19:52:29 org.apache.catalina.core.ApplicationContext log
>
> INFO: SessionListener: contextInitialized()
>
> 14-aug-2007 19:52:29 org.apache.coyote.http11.Http11Protocol start
>
> INFO: Starting Coyote HTTP/1.1 on http-8080
>
> 14-aug-2007 19:52:29 org.apache.jk.common.ChannelSocket init
>
> INFO: JK: ajp13 listening on /0.0.0.0:8009
>
> 14-aug-2007 19:52:29 org.apache.jk.server.JkMain start
>
> INFO: Jk running ID=0 time=0/59  config=null
>
> 14-aug-2007 19:52:29 org.apache.catalina.startup.Catalina start
>
> INFO: Server startup in 625992 ms
>
>
>
> It very much reminds me of the fact that as of the Servlet 2.5??? spec, a
> container is required to validate against DTDs/schemas when using an XML
> document. The strange thing is that the first faces config (Ajax4jsf) is
> fast, at least this time. Most of the time it is slow with a timeout. The
> other faces config (Facelets) takes approximately 6 minutes before timing
> out.
>
>
>
> I'm using:
>
> -          Tomcat 6.0.13
>
> -          MyFaces 1.2.0
>
> -          Facelets 1.1.11
>
> -          Trinidad 1.2.1
>
> -          Ajax4jsf 1.0.6
>
>
>
> I first tried this at a customer, with RI, where we suspected the proxy
> server was the problem, but now – at home, using MyFaces – it also doesn't
> work the way I'd like it.
>
>
>
> Does someone of you encountered this problem too?
>
>
>
> Greets,
>
>
>
> Jan-Kees van Andel
>

Mime
View raw message