eclipse tomcat 启动报错 java.lang.ClassNotFoundException

1. 错误描述

    在eclipse中部署添加tomcat服务,启动报错 class未发现的错误

目录

1. 错误描述

1.1 错误截图

1.1 错误日志

2.错误分析

 2.1  错误日志摄取:

2.1  Tomcat目录截图:

3.检查

3.1步骤一

3.2 步骤二​

3.3 步骤三

3.4 步骤四

4.校验

4.1 tomcat的目录下截图

4.2 启动tomcat

5.如果是maven lib 没有导入 查看 

5.1  点击查看:eclipse tomcat启动 maven lib未部署


1.1 错误截图

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第1张图片
 

1.1 错误日志

九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/8.5.42
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Jun 4 2019 20:29:04 UTC
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         8.5.42.0
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 7
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.1
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             E:\Program Files\Java\jdk1.8.0_212\jre
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.8.0_212-b10
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\amazing\work\eclipse_sts\three\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         E:\Program Files\apache\apache-tomcat-8.5.42
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:52951
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -javaagent:E:\Program Files\sts-4.2.2.RELEASE\configuration\org.eclipse.osgi\773\0\.cp\lib\javaagent-shaded.jar
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\amazing\work\eclipse_sts\three\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=E:\Program Files\apache\apache-tomcat-8.5.42
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\amazing\work\eclipse_sts\three\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=E:\Program Files\apache\apache-tomcat-8.5.42\endorsed
九月 25, 2019 10:42:31 上午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
九月 25, 2019 10:42:31 上午 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: [E:\Program Files\Java\jdk1.8.0_212\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;E:\Program Files\Java\jdk1.8.0_212\jre\bin;E:/Program Files/Java/jre1.8.0_212/bin/server;E:/Program Files/Java/jre1.8.0_212/bin;E:/Program Files/Java/jre1.8.0_212/lib/amd64;E:\Program Files (x86)\NetSarang\Xshell 6\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;c:\gtk\bin;c:\gtk\bin;D:\java\jdk1.8r\bin;D:\java\jdk1.8r\jre\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\朱小龙\mongodb-win32-x86_64-2008plus-2.4.14\mongodb-win32-x86_64-2008plus-2.4.14\bin;E:;mysql-5.7.7-rc-winx64\mysql-5.7.7-rc-winx64\bin;E:\Program Files\apache-maven-3.6.1\bin;C:\strawberry\c\bin;C:\strawberry\perl\bin;F:\Program Files\Git\cmd;E:\Program Files\nodejs\;;E:\Program Files\Microsoft VS Code\bin;E:\Program Files\sts-4.2.2.RELEASE;;.]
九月 25, 2019 10:42:32 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-8080"]
九月 25, 2019 10:42:32 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 25, 2019 10:42:32 上午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
九月 25, 2019 10:42:32 上午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
九月 25, 2019 10:42:32 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 1735 ms
九月 25, 2019 10:42:32 上午 org.apache.catalina.core.StandardService startInternal
信息: Starting service [Catalina]
九月 25, 2019 10:42:32 上午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/8.5.42
九月 25, 2019 10:42:33 上午 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.
九月 25, 2019 10:42:46 上午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
九月 25, 2019 10:42:46 上午 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.
九月 25, 2019 10:42:47 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class [org.jeecgframework.web.system.listener.InitListener]
java.lang.ClassNotFoundException: org.jeecgframework.web.system.listener.InitListener
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1185)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4692)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

九月 25, 2019 10:42:47 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Error configuring application listener of class [org.jeecgframework.web.system.listener.OnlineListener]
java.lang.ClassNotFoundException: org.jeecgframework.web.system.listener.OnlineListener
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1364)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1185)
	at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:546)
	at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:527)
	at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4692)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5236)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

九月 25, 2019 10:42:47 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Skipped installing application listeners due to previous error(s)
九月 25, 2019 10:42:47 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
九月 25, 2019 10:42:47 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/ROOT] startup failed due to previous errors
九月 25, 2019 10:42:47 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
九月 25, 2019 10:42:48 上午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
九月 25, 2019 10:42:48 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 15672 ms
九月 25, 2019 10:42:49 上午 org.apache.tomcat.util.http.parser.HttpParser 
警告: Character [[] is not allowed and will continue to be rejected.
九月 25, 2019 10:42:49 上午 org.apache.tomcat.util.http.parser.HttpParser 
警告: Character []] is not allowed and will continue to be rejected.

 

2.错误分析

 

 2.1  错误日志摄取:

    信息: Command line argument: -Dwtp.deploy=D:\amazing\work\eclipse_sts\three\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps

 

2.1  Tomcat目录截图:

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第2张图片

 

3.检查

 

3.1步骤一

右击项目 -> properties

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第3张图片

 

3.2 步骤二

点击 java Bulid Path -> Source 

先remove   project-name/src/main/resources 再重新 Add Folder (resources目录)

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第4张图片

 

3.3 步骤三

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第5张图片

 

3.4 步骤四

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第6张图片

4.校验

 

4.1 tomcat的目录下截图

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第7张图片

 

4.2 启动tomcat

eclipse tomcat 启动报错 java.lang.ClassNotFoundException_第8张图片

 

5.如果是maven lib 没有导入 查看 

5.1  点击查看:eclipse tomcat启动 maven lib未部署

你可能感兴趣的:(eclipse)