java.lang.NoClassDefFoundError: com/alibaba/druid/support/http/StatViewServlet
配置如下:
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
没在web.xml里配置。 问题解决了。重建了几次项目,删除了关联项目的多余的druid的 dependency,。不知道是不是maven的包冲突,经常会遇到某个包中的类找不到,而查看引用的包时确实有。
web.xml里配置的德鲁伊的监控吧