Tomcat-8でアプリを実行しているときに次のエラーが発生します。 Eclipse Luna-32ビット、Tomcat-8 32ビット、Java-832ビットを使用しています。
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
次の手順を実行すると、エラーが削除されました。
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
私も同じ例外に直面していました。私の場合の問題は、WEB-INFの下のlibフォルダーが誤って削除されたで、カスタムjarをプロジェクトのメインフォルダーに配置し、そこからビルドパスで参照し始めました。
多くの時間を費やした後、私はこの間違いに気づき、ディレクトリ構造を修正し、WEB-INFの下にlibフォルダーを作成し、そこにカスタムjarを配置して、そこから参照しました。それは働き始めました。
同じ.Javaファイルが別のパッケージに存在することを確認してください。存在する場合は、この.Javaファイルを削除して、このタイプの問題を解決してください。 (Eclipse IDE)