2012-04-07 3 views
0

Die Dinge funktionierten großartig. Ich bin mir nicht bewusst, etwas verändert zu haben, aber offensichtlich hat sich etwas verändert.Ich benutzte Tomcat mit Eclipse schön. Jetzt kann ich den Server nicht starten. Ich bekomme die folgende Ausnahme beim Versuch zu starten

Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext listenerStart 
SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener 
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester 
    at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl.<init>(DigesterFacesConfigUnmarshallerImpl.java:42) 
    at org.apache.myfaces.config.FacesConfigurator.getUnmarshaller(FacesConfigurator.java:262) 
    at org.apache.myfaces.config.FacesConfigurator.feedStandardConfig(FacesConfigurator.java:566) 
    at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:487) 
    at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:296) 
    at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73) 
    at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:118) 
    at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111) 
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779) 
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) 
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.Digester 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556) 
    ... 18 more 
Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext startInternal 
SEVERE: Error listenerStart 
Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext startInternal 
SEVERE: Context [/webApp_appNameT] startup failed due to previous errors 
Apr 7, 2012 12:28:29 PM org.apache.catalina.core.StandardContext listenerStop 
SEVERE: Exception sending context destroyed event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener 
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:172) 
    at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:131) 
    at org.apache.myfaces.webapp.AbstractFacesInitializer._dispatchApplicationEvent(AbstractFacesInitializer.java:239) 
    at org.apache.myfaces.webapp.AbstractFacesInitializer.destroyFaces(AbstractFacesInitializer.java:273) 
    at org.apache.myfaces.webapp.StartupServletContextListener.contextDestroyed(StartupServletContextListener.java:153) 
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4819) 
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5466) 
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) 
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566) 
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556) 
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 
Apr 7, 2012 12:28:29 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 
SEVERE: The web application [/webApp_appNameT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and a value of type [org.apache.myfaces.config.RuntimeConfig] (value [[email protected]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
Apr 7, 2012 12:28:29 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 
SEVERE: The web application [/webApp_appNameT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and a value of type [org.apache.myfaces.context.servlet.StartupFacesContextImpl] (value [[email protected]3]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
Apr 7, 2012 12:28:29 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks 
SEVERE: The web application [/webApp_appNameT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [[email protected]]) and a value of type [org.apache.myfaces.context.servlet.StartupFacesContextImpl] (value [[email protected]b]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak. 
Apr 7, 2012 12:28:29 PM org.apache.coyote.AbstractProtocol start 
INFO: Starting ProtocolHandler ["http-bio-8080"] 
Apr 7, 2012 12:28:29 PM org.apache.coyote.AbstractProtocol start 
INFO: Starting ProtocolHandler ["ajp-bio-8009"] 
Apr 7, 2012 12:28:29 PM org.apache.catalina.startup.Catalina start 
INFO: Server startup in 1756 ms 
+2

Die Bibliotheken werden bereitgestellt; du vermisst wenigstens Commons-Digestor. –

+0

@DaveNewton Wo muss ich das Commons-Digest-Glas platzieren? Es hat vor 30 Minuten funktioniert, also ist meine Verwirrung, was ist passiert? – Dale

+1

Ich würde wirklich nicht wissen, wohin es ging. –

Antwort

3
Caused by: java.lang.ClassNotFoundException: org.apache.commons.digester.Digester 

Sie Dies sagt nur, dass die genannten Klasse in der Runtime-Classpath fehlt. Wie der Name des Pakets sagt, ist Apache Commons Digester unter http://commons.apache.org/digester verfügbar. Wenn Sie die JAR-Datei herunterladen und sie in einem der Pfade ablegen, die vom Laufzeitklassenpfad der Webanwendung abgedeckt werden, z. B. /WEB-INF/lib, sollte dieses Problem verschwinden.

+0

Ich habe das Glas zur/WEB-INF/lib hinzugefügt und ich habe die gleichen Ergebnisse erhalten. Dieses Glas war vor 30 Minuten nicht da, als es funktionierte. Irgendwelche anderen Ideen? – Dale

4

Ich hatte das gleiche Problem. Webapp und Tomcat in Eclipse lief schön, dann Sonnenfinsternis eingefroren; Ich musste es mit TaskManager töten. Allerdings, wenn ich Tomcat neu gestartet, über Fehler java.lang.NoClassDefFoundError: org/apache/commons/Digestor/Digester erschien.

Es ergab keinen Sinn, weil die Webapp zuvor gut lief. Ich löste es durch Reinigung der Eclipse Tomcat Webapp-Verzeichnis.

  1. Gehen Sie zur Registerkarte Server -> Klicken Sie mit der rechten Maustaste auf Ihre Webapp -> Clean Module Verzeichnis.
  2. Gehen Sie auf die Registerkarte Server -> Rechtsklick auf verwendet Tomcat-Instanz -> Sauber ...

Nach dass der Fehler verschwunden und die Webapp lief wieder wie vorher.

Verwandte Themen