web-dev-qa-db-fra.com

Impossible de démarrer le composant [StandardEngine [Catalina] .StandardHost [hôte local] .StandardContext [/ nomProjet]]

Je reçois une erreur de suivi lors de l'exécution de l'application sur Tomcat-8. J'utilise Eclipse Luna-32 bits, Tomcat-8 32 bits, Java-8 32 bits.

INFO: Starting Servlet Engine: Apache Tomcat/8.0.18
Dec 24, 2015 6:36:59 PM org.Apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor E:\PROJECTS\.metadata\.plugins\org.Eclipse.wst.server.core\tmp0\conf\Catalina\localhost\connect_afs_ui.xml
Dec 24, 2015 6:36:59 PM org.Apache.catalina.startup.SetContextPropertiesRule begin
WARNING: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.Eclipse.jst.jee.server:connect_afs_ui' did not find a matching property.
Dec 24, 2015 6:36:59 PM org.Apache.catalina.core.ContainerBase addChildInternal
SEVERE: ContainerBase.addChild: start: 
org.Apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/connect_afs_ui]]
    at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:154)
    at org.Apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.Java:725)
    at org.Apache.catalina.core.ContainerBase.addChild(ContainerBase.Java:701)
    at org.Apache.catalina.core.StandardHost.addChild(StandardHost.Java:714)
    at org.Apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.Java:581)
    at org.Apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.Java:1683)
    at Java.util.concurrent.Executors$RunnableAdapter.call(Executors.Java:511)
    at Java.util.concurrent.FutureTask.run(FutureTask.Java:266)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:617)
    at Java.lang.Thread.run(Thread.Java:745)
Caused by: org.Apache.catalina.LifecycleException: Failed to initialize component [org.Apache.catalina.webresources.StandardRoot@146cf9f]
    at org.Apache.catalina.util.LifecycleBase.init(LifecycleBase.Java:106)
    at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:139)
    at org.Apache.catalina.core.StandardContext.resourcesStart(StandardContext.Java:4832)
    at org.Apache.catalina.core.StandardContext.startInternal(StandardContext.Java:4962)
    at org.Apache.catalina.util.LifecycleBase.start(LifecycleBase.Java:150)
    ... 10 more
Caused by: org.Apache.catalina.LifecycleException: Failed to initialize component [org.Apache.catalina.webresources.DirResourceSet@1679622]
    at org.Apache.catalina.util.LifecycleBase.init(LifecycleBase.Java:106)
    at org.Apache.catalina.webresources.StandardRoot.initInternal(StandardRoot.Java:657)
    at org.Apache.catalina.util.LifecycleBase.init(LifecycleBase.Java:102)
    ... 14 more
Caused by: Java.lang.IllegalArgumentException: The directory specified by base and internal path [C:\Users\ravi.suthar\git\FashionConnect\connect_afs_ui\target\test-classes]\[] does not exist.
    at org.Apache.catalina.webresources.DirResourceSet.checkType(DirResourceSet.Java:247)
    at org.Apache.catalina.webresources.AbstractFileResourceSet.initInternal(AbstractFileResourceSet.Java:134)
    at org.Apache.catalina.util.LifecycleBase.init(LifecycleBase.Java:102)
    ... 16 more

Dec 24, 2015 6:36:59 PM org.Apache.catalina.startup.HostConfig deployDescriptor
SEVERE: Error deploying configuration descriptor E:\PROJECTS\.metadata\.plugins\org.Eclipse.wst.server.core\tmp0\conf\Catalina\localhost\connect_afs_ui.xml
Java.lang.IllegalStateException: ContainerBase.addChild: start: org.Apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/connect_afs_ui]]
    at org.Apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.Java:728)
    at org.Apache.catalina.core.ContainerBase.addChild(ContainerBase.Java:701)
    at org.Apache.catalina.core.StandardHost.addChild(StandardHost.Java:714)
    at org.Apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.Java:581)
    at org.Apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.Java:1683)
    at Java.util.concurrent.Executors$RunnableAdapter.call(Executors.Java:511)
    at Java.util.concurrent.FutureTask.run(FutureTask.Java:266)
    at Java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.Java:1142)
    at Java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.Java:617)
    at Java.lang.Thread.run(Thread.Java:745)

Dec 24, 2015 6:36:59 PM org.Apache.catalina.startup.HostConfig deployDescriptor
INFO: Deployment of configuration descriptor E:\PROJECTS\.metadata\.plugins\org.Eclipse.wst.server.core\tmp0\conf\Catalina\localhost\connect_afs_ui.xml has finished in 18 ms
Dec 24, 2015 6:36:59 PM org.Apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Dec 24, 2015 6:36:59 PM org.Apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Dec 24, 2015 6:36:59 PM org.Apache.catalina.startup.Catalina start
INFO: Server startup in 303 ms
3
ravi

J'ai fait les étapes suivantes et l'erreur supprimée.

1. Delete existing Tomcat from the Eclipse Server tab and remove existing Tomcat directory
2. Provide new copy of Tomcat in Server tab > add new server
3. Double click on Tomcat from server tab
4. In Tomcat overview tab, in Server Option 
    a. unselect > Select modules without publishing
    b. unselect > Publish modules contexts to separate XML files
5. Save Tomcat changes
6. Add project to Tomcat
7. Publish 
8. Start / Debug    
8
ravi

Je faisais également face à la même exception. Dans mon cas, le problème était que le dossier lib sous WEB-INF avait été supprimé par erreur et j'ai commencé à placer des fichiers JAR personnalisés dans le dossier principal du projet, puis référencés dans le chemin de génération.

Après avoir passé beaucoup de temps, j'ai réalisé cette erreur et juste corrigé la structure des répertoires. J'ai créé le dossier lib sous WEB-INF et y ai référencé des fichiers jar personnalisés. Cela a commencé à fonctionner.

0
Hammad Hassan