NutzCN Logo
问答 druid jar包引入,工程启动报错
发布于 2696天前 作者 qq_32ee9e89 2835 次浏览 复制 上一个帖子 下一个帖子
标签:

引入druid包版本 1.1.0

8-Aug-2017 11:21:28.624 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [nutz]
 java.lang.NoClassDefFoundError: org/apache/log4j/Priority
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
	at java.lang.Class.privateGetPublicMethods(Class.java:2902)
	at java.lang.Class.getMethods(Class.java:1615)
	at org.nutz.mvc.impl.Loadings.isModule(Loadings.java:336)
	at org.nutz.mvc.impl.Loadings.checkModule(Loadings.java:197)
	at org.nutz.mvc.impl.Loadings.scanModuleInPackage(Loadings.java:187)
	at org.nutz.mvc.impl.Loadings.scanModules(Loadings.java:166)
	at org.nutz.mvc.impl.NutLoading.evalUrlMapping(NutLoading.java:180)
	at org.nutz.mvc.impl.NutLoading.load(NutLoading.java:108)
	at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:19)
	at org.nutz.mvc.NutFilter._init(NutFilter.java:91)
	at org.nutz.mvc.NutFilter.init(NutFilter.java:69)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4581)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5223)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:456)
	at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:405)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
10 回复

@IocBy写了啥?

还没有写@IocBy ,仅仅在gradle里新引入了 druid jar包

工程里加着log4j那 log4j 版本2.8.2

log4j-1.2-api

公司要求用高版本的,不能用那么高的吗?

只是很奇怪的扫描Module类的时候报错, 难道你把MainModule放在根package下面的?

MainMoudel 在java com包下 ,下面是MainModule代码

public class MainModule {

}

选一个独立的package, 不要用com这么容易冲突的package.

换了一个新的package,没问题了。

添加回复
请先登陆
回到顶部