java.lang.NoClassDefFoundError: com/alibaba/druid/support/http/StatViewServlet

onewarden 发布于 2014/07/05 11:04
阅读 4K+
收藏 0

配置如下:

C3p0Plugin c3p0Plugin = new C3p0Plugin(getProperty("jdbcUrl"), getProperty("user"), getProperty("password").trim());

me.add(c3p0Plugin);

AutoTableBindPlugin atbp = new AutoTableBindPlugin(c3p0Plugin); 
//ActiveRecordPlugin arp = new ActiveRecordPlugin(c3p0Plugin);

me.add(atbp);

并没有用druid,但会报如下错误

java.lang.NoClassDefFoundError: com/alibaba/druid/support/http/StatViewServlet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at com.jfinal.ext.kit.Reflect.forName(Reflect.java:691)
at com.jfinal.ext.kit.Reflect.on(Reflect.java:85)
at com.jfinal.ext.kit.ClassSearcher.extraction(ClassSearcher.java:38)
at com.jfinal.ext.kit.ClassSearcher.search(ClassSearcher.java:172)
at com.jfinal.ext.plugin.tablebind.AutoTableBindPlugin.start(AutoTableBindPlugin.java:93)
at com.jfinal.core.Config.startPlugins(Config.java:85)
at com.jfinal.core.Config.configJFinal(Config.java:48)
at com.jfinal.core.JFinal.init(JFinal.java:67)
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:4656)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5309)
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$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: com.alibaba.druid.support.http.StatViewServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
... 31 more



加载中
0
alexway
alexway
web.xml里配置的德鲁伊的监控吧
o
onewarden
没在web.xml里配置。 问题解决了。重建了几次项目,删除了关联项目的多余的druid的 dependency,。不知道是不是maven的包冲突,经常会遇到某个包中的类找不到,而查看引用的包时确实有。
返回顶部
顶部