java.lang.NoClassDefFoundError: com/alibaba/druid/pool/DruidDataSource

请问一下:

为啥我启动Tomcat会报这种错?没有找到阿里巴巴的类是什么情况?


七月 25, 2017 1:20:59 下午 org.apache.catalina.core.AprLifecycleListener init

信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Java\jdk1.8\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/Java/jre1.8/bin/server;D:/Java/jre1.8/bin;D:/Java/jre1.8/lib/amd64;C:\ProgramData\Oracle\Java\javapath;d:\app\Administrator\product\11.1.0\db_1\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Java\jdk1.8\bin;D:\Java\jdk1.8\jre\bin;D:\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;D:\apache-maven-3.5.0\bin;D:\eclipse;;.

七月 25, 2017 1:20:59 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin

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

七月 25, 2017 1:21:00 下午 org.apache.coyote.AbstractProtocol init

信息: Initializing ProtocolHandler ["http-bio-80"]

七月 25, 2017 1:21:00 下午 org.apache.coyote.AbstractProtocol init

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

七月 25, 2017 1:21:00 下午 org.apache.catalina.startup.Catalina load

信息: Initialization processed in 2178 ms

七月 25, 2017 1:21:00 下午 org.apache.catalina.core.StandardService startInternal

信息: Starting service Catalina

七月 25, 2017 1:21:00 下午 org.apache.catalina.core.StandardEngine startInternal

信息: Starting Servlet Engine: Apache Tomcat/7.0.47

七月 25, 2017 1:21:03 下午 org.apache.catalina.util.SessionIdGenerator createSecureRandom

信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [1,451] milliseconds.

七月 25, 2017 1:21:05 下午 org.apache.catalina.core.StandardContext filterStart

严重: Exception starting filter jfinal

java.lang.NoClassDefFoundError: com/alibaba/druid/pool/DruidDataSource

at com.jfinal.plugin.druid.DruidPlugin.start(DruidPlugin.java:180)

at com.jfinal.core.Config.startPlugins(Config.java:107)

at com.jfinal.core.Config.configJFinal(Config.java:53)

at com.jfinal.core.JFinal.init(JFinal.java:63)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)

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

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

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

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

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:748)

Caused by: java.lang.ClassNotFoundException: com.alibaba.druid.pool.DruidDataSource

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)

at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)

... 17 more


七月 25, 2017 1:21:05 下午 org.apache.catalina.core.StandardContext startInternal

严重: Error filterStart

七月 25, 2017 1:21:05 下午 org.apache.catalina.core.StandardContext startInternal

严重: Context [/TPL_GOODS] startup failed due to previous errors

七月 25, 2017 1:21:05 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["http-bio-80"]

七月 25, 2017 1:21:05 下午 org.apache.coyote.AbstractProtocol start

信息: Starting ProtocolHandler ["ajp-bio-8009"]

七月 25, 2017 1:21:05 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 5375 ms


评论区

阿萨德fei

2017-07-25 14:04

用jetty启动也是一样

JFinal

2017-07-25 14:31

缺少 druid 的 jar 包,这个是最基本的异常,建议补习一下基础

阿萨德fei

2017-07-25 15:14

@JFinal 搞定了,感谢!

MarlonBrando

2019-08-28 20:37

@JFinal 加了jar包一样

热门反馈

扫码入社