C3P0报错,我已经添加相关的包了,但还是出现ClassNotFoundException!?求解!

01-Mar-2017 13:32:34.638 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter jfinal

 java.lang.NoClassDefFoundError: com/mchange/v2/c3p0/ComboPooledDataSource

at com.jfinal.plugin.c3p0.C3p0Plugin.start(C3p0Plugin.java:150)

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

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

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

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

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

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

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

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

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

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

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

at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:586)

at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1780)

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: java.lang.ClassNotFoundException: com.mchange.v2.c3p0.ComboPooledDataSource

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)

... 21 more


评论区

JFinal

2017-03-01 17:19

添加了相关的 jar 并不意味着真的生效了。此外,建议换成 DruidPlugin

眼睛想旅行

2017-03-13 16:06

@JFinal 好的,谢谢

热门反馈

扫码入社