Yes, I thought about that too, but I'm no Xerces expert and can't find an appropriate startup param/system property/something to customize the namespace resolving...
Greets, Jan-Kees -----Oorspronkelijk bericht----- Van: Martin Marinschek [mailto:[EMAIL PROTECTED] Verzonden: wo 15-8-2007 9:52 Aan: MyFaces Discussion Onderwerp: Re: Very slow Tomcat 6 startup when using MyFaces 1.2.0 Try to get Tomcat to resolve your DTD - XSD locally... regards, Martin On 8/15/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hrmm, I thought I already checked that, but it does sound reasonable. I'm > gonna try it tonight. > > Thanks, > > Jan-Kees > > > -----Oorspronkelijk bericht----- > Van: Adam Winer [mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>] > Verzonden: wo 15-8-2007 2:31 > Aan: MyFaces Discussion > Onderwerp: Re: Very slow Tomcat 6 startup when using MyFaces 1.2.0 > > > Or Jan-Kees is behind a firewall, and the server can't be reached. > > -- Adam > > > > On 8/14/07, Simon Lessard <[EMAIL PROTECTED]> wrote: > > Hi Jan-Kees, > > > > That's a good question... Even more since it doesn't seem to be > > deterministic. Your idea about DTD/XSD validation might be the right > one. I > > guess it try to get it from the public location and the remote server is > > sometimes experiencing a heavy load, thus dropping your connection after > its > > max timeout... I don't know how you can disable that in Tomcat though... > I > > must admit, with some shame, that I work more often with OC4J than > Tomcat. > > > > > > > > Regards, > > > > ~ Simon > > > > On 8/14/07, Jan-Kees van Andel <[EMAIL PROTECTED]> wrote: > > > Hello, > > > > > > Simon, thank you for the fast response. > > > > > > But how can you explain the fact that Tomcat 'hangs' 6 minutes on: > > > "INFO: Reading config > > > > > jar: > file:/D:/dev/appsrv/apache-tomcat-6.0.13/temp/0-mblf/WEB-INF/lib/jsf-fac > > > elets-1.1.11.jar!/META-INF/faces-config.xml"? > > > > > > I get the "SocketException: Connection reset" before the Context > Listener > > > Exception occurs. That seems to be the problem, doesn't it? Sometimes, > > when > > > loading the faces-configs succeeds, I don't get any Exceptions at all, > not > > > even the IllegalStateException. > > > > > > BTW, I just downloaded Tomcat 6.0.14, added the context listener in my > > > web.xml and removed jsp-api-2.1 from my deployment. Eclipse added it, > it's > > > not my fault. ;) > > > > > > Greets, > > > > > > Jan-Kees > > > > > > > > > From: Simon Lessard [mailto:[EMAIL PROTECTED]<[EMAIL PROTECTED]> > ] > > > Sent: dinsdag 14 augustus 2007 20:17 > > > To: MyFaces Discussion > > > Subject: Re: Very slow Tomcat 6 startup when using MyFaces 1.2.0 > > > > > > 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 > </lis > > > tener-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 <[EMAIL PROTECTED] > 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.FacesConfigurator > > > feedStandardConfig > > > INFO: Reading standard config META-INF/standard- faces-config.xml > > > 14-aug-2007 19:42:05 > > org.apache.myfaces.config.FacesConfigurator > > > feedClassloaderConfigurations > > > INFO: Reading config > > > > > jar: > file:/D:/dev/appsrv/apache-tomcat-6.0.13/temp/0-mblf/WEB-INF/lib/ajax4js > > > f-1.0.6.jar!/META-INF/faces-config.xml > > > 14-aug-2007 19:42:19 > > org.apache.myfaces.config.FacesConfigurator > > > feedClassloaderConfigurations > > > INFO: Reading config > > > > > jar: > file:/D:/dev/appsrv/apache-tomcat-6.0.13/temp/0-mblf/WEB-INF/lib/jsf-fac > > > elets-1.1.11.jar!/META-INF/faces-config.xml > > > 14-aug-2007 19:52:28 > > org.apache.myfaces.webapp.DefaultFacesInitializer > > > initFaces > > > SEVERE: Error initializing MyFaces: java.net.SocketException: > Connection > > > reset > > > javax.faces.FacesException: java.net.SocketException: Connection reset > > > at > > > > > > org.apache.myfaces.config.FacesConfigurator.feedClassloaderConfigurations > (Fa > > > cesConfigurator.java:425 ) > > > at > > > org.apache.myfaces.config.FacesConfigurator.configure > > (FacesConfigurator.java > > > :171) > > > at > > > > > org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces > (DefaultFacesInit > > > ializer.java:112 ) > > > at > > > > > > org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized > > (S > > > tartupServletContextListener.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:7 > > > 91) > > > 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 > > (LifecycleSuppor > > > t.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 > (HttpURLConn > > > ection.java:2364 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLEntityManager$RewindableInputStre > > > am.read(XMLEntityManager.java :2940 ) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read( > UTF8Reader.java:2 > > > 92) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load > (XMLEntityScann > > > er.java:1742 ) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces > > (XMLEntit > > > yScanner.java:1543 ) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.skipSeparator > (XMLD > > > TDScannerImpl.java:2055 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanAttlistDecl > > (XM > > > LDTDScannerImpl.java:1187 ) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDecls > (XMLDTDSc > > > annerImpl.java:1983 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.scanDTDExternalSub > > > set(XMLDTDScannerImpl.java:320 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dis > > > patch(XMLDocumentScannerImpl.java:1177 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.nex > > > t(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 > > (XMLDocum > > > entScannerImpl.java:645 ) > > > at > > > > > com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next > (XMLNSD > > > ocumentScannerImpl.java:140 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanD > > > ocument(XMLDocumentFragmentScannerImpl.java:508 ) > > > at > > > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse > (XML11Con > > > figuration.java:807 ) > > > at > > > > > com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse > > (XML11Con > > > figuration.java:737 ) > > > at > > > > > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse( > XMLParser.java:10 > > > 7) > > > at > > > > > com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse > (AbstractS > > > AXParser.java :1205 ) > > > at > > > > > > com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse > (SA > > > XParserImpl.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 > (Fa > > > cesConfigurator.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 > </lis > > > tener-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:11 > > > 61) > > > 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:7 > > > 91) > > > 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 > (LifecycleSuppor > > > t.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.StandardContext loadOnStartup > > > 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 > </lis > > > tener-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:11 > > > 61) > > > 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:7 > > > 91) > > > 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 > (LifecycleSuppor > > > t.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 > > > > > > > > > > > > > > > -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces

