记录一个奇怪的异常,无法还原此异常。 普通的Maven Java Web 项目

项目 : 普通的Maven Java Web 项目

操作记录:

使用 Maven 构建项目,指令 tomcat7:run 无异常

但使用 eclipse 的 tomcat 运行项目,报此异常。

后面从tomcat删除了此项目,重新运行则不报错了。

不明白原因,记录。

异常全文:

十二月 27, 2017 10:59:07 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin

警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:MyTest' did not find a matching property.

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server version:        Apache Tomcat/9.0.1

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server built:          Sep 27 2017 17:31:52 UTC

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Server number:         9.0.1.0

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: OS Name:               Windows 10

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: OS Version:            10.0

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Architecture:          amd64

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Java Home:             C:\Program Files\Java\jdk1.8.0_111\jre

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: JVM Version:           1.8.0_111-b14

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: JVM Vendor:            Oracle Corporation

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: CATALINA_BASE:         D:\workspaces\ssm_basic\.metadata\.plugins\org.eclipse.wst.server.core\tmp0

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: CATALINA_HOME:         D:\tomcatServer\apache-tomcat-9.0.1\apache-tomcat-9.0.1

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:7001

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcatalina.base=D:\workspaces\ssm_basic\.metadata\.plugins\org.eclipse.wst.server.core\tmp0

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dcatalina.home=D:\tomcatServer\apache-tomcat-9.0.1\apache-tomcat-9.0.1

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dwtp.deploy=D:\workspaces\ssm_basic\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Djava.endorsed.dirs=D:\tomcatServer\apache-tomcat-9.0.1\apache-tomcat-9.0.1\endorsed

十二月 27, 2017 10:59:07 下午 org.apache.catalina.startup.VersionLoggerListener log

信息: Command line argument: -Dfile.encoding=UTF-8

十二月 27, 2017 10:59:07 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_111\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_111\jre\bin;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_111/bin/../jre/lib/amd64;C:\Program Files (x86)\Graphviz2.38\bin;C:\Program Files (x86)\Common Files\Intel\Shared Files\cpp\bin\Intel64;C:\Program Files\Java\jdk1.8.0_111\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\mybox\mypath;D:\mybox\mysql\mysql-5.7.18-winx64\mysql-5.7.18-winx64\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files\MacType;D:\maven\apache-maven-3.5.0\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Bandizip\;D:\eclipseIDE\eclipse-jee-oxygen-1a-win32-x86_64\eclipse;;.]

十二月 27, 2017 10:59:08 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-nio-8093"]

十二月 27, 2017 10:59:08 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

信息: Using a shared selector for servlet write/read

十二月 27, 2017 10:59:08 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["ajp-nio-8009"]

十二月 27, 2017 10:59:08 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector

信息: Using a shared selector for servlet write/read

十二月 27, 2017 10:59:08 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 2051 ms

十二月 27, 2017 10:59:08 下午 org.apache.catalina.core.StandardService startInternal

信息: Starting service [Catalina]

十二月 27, 2017 10:59:08 下午 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/9.0.1

十二月 27, 2017 10:59:16 下午 org.apache.jasper.servlet.TldScanner scanJars

信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

十二月 27, 2017 10:59:16 下午 org.apache.catalina.core.ContainerBase startInternal

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@31ecd003]

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:671)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.webresources.StandardRoot@31ecd003]

at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)

at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4758)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4893)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

... 21 more

Caused by: java.lang.IllegalArgumentException: The main resource set specified [D:\workspaces\ssm_basic\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\MyTest] is not valid

at org.apache.catalina.webresources.StandardRoot.createMainResourceSet(StandardRoot.java:749)

at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:706)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

... 30 more

十二月 27, 2017 10:59:16 下午 org.apache.catalina.core.ContainerBase startInternal

严重: A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start

at java.util.concurrent.FutureTask.report(FutureTask.java:122)

at java.util.concurrent.FutureTask.get(FutureTask.java:192)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:671)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

Caused by: org.apache.catalina.LifecycleException: A child container failed during start

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:956)

at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1425)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1415)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)

at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:941)

... 13 more

十二月 27, 2017 10:59:16 下午 org.apache.catalina.startup.Catalina start

严重: The required Server component failed to start so Tomcat is unable to start.

org.apache.catalina.LifecycleException: A child container failed during start

at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:956)

at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)

at org.apache.catalina.startup.Catalina.start(Catalina.java:671)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)

十二月 27, 2017 10:59:16 下午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["http-nio-8093"]

十二月 27, 2017 10:59:16 下午 org.apache.coyote.AbstractProtocol pause

信息: Pausing ProtocolHandler ["ajp-nio-8009"]

十二月 27, 2017 10:59:16 下午 org.apache.catalina.core.StandardService stopInternal

信息: Stopping service [Catalina]

十二月 27, 2017 10:59:16 下午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["http-nio-8093"]

十二月 27, 2017 10:59:16 下午 org.apache.coyote.AbstractProtocol destroy

信息: Destroying ProtocolHandler ["ajp-nio-8009"]

上一篇:Java web 开发填坑记 2 -如何正确的创建一个Java Web 项目


下一篇:全网最详细的Eclipse和MyEclipse里对于Java web项目发布到Tomcat上运行成功的对比事宜【博主强烈推荐】【适合普通的还是Maven方式创建的】(图文详解)