为了账号安全,请及时绑定邮箱和手机立即绑定

maven引用第三方jar包 路径配置没错 启动tomcat报NoClassDefFoundError

maven引用第三方jar包 路径配置没错 启动tomcat报NoClassDefFoundError

肥皂起泡泡 2019-01-17 18:13:03
maven引用第三方jar包 路径配置没错 启动tomcat报NoClassDefFoundError 错误信息:严重: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loggingInitialization' defined in class path resource [conf/spring/spring-impl.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodException: com.u2u.framework.log.util.LogbackConfigurer.initLogging(String)(java.lang.String) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4602) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5066) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:839) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1427) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1417) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:943) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:258) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:770) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:682) 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.catalina.startup.Bootstrap.start(Bootstrap.java:350) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492) Caused by: java.lang.NoSuchMethodException: com.u2u.framework.log.util.LogbackConfigurer.initLogging(java.lang.String) at java.lang.Class.getMethod(Class.java:1786) at org.springframework.util.MethodInvoker.prepare(MethodInvoker.java:178) at org.springframework.beans.factory.config.MethodInvokingFactoryBean.afterPropertiesSet(MethodInvokingFactoryBean.java:149) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 42 more spring配置: <bean id="loggingInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass" value="com.u2u.framework.log.util.LogbackConfigurer" /> <property name="targetMethod" value="initLogging" /> <property name="arguments"> <list> <value>classpath:conf/log/DEV_logging.xml</value> </list> </property> </bean> u2u是引入的第三方jar包
查看完整描述

3 回答

?
一只甜甜圈

TA贡献1836条经验 获得超5个赞

进去jar包里面检查一下是否有这个方法com.u2u.framework.log.util.LogbackConfigurer.initLogging(java.lang.String)
如果有在检查一下是否同时存在多个版本?

查看完整回答
反对 回复 2019-03-01
?
HUX布斯

TA贡献1876条经验 获得超6个赞

今天下午解决了,把那个包删了,然后在加进去,这样弄了4次,突然就好了,不知道是什么原因

查看完整回答
反对 回复 2019-03-01
?
阿晨1998

TA贡献2037条经验 获得超6个赞

用命令行的话加上 -U选项试试

查看完整回答
反对 回复 2019-03-01
  • 3 回答
  • 0 关注
  • 1315 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信