jar包冲突案例分析.md ###1. 错误现象,第一个错误是
2015-05-22 17:21:27.304:WARN:oejuc.AbstractLifeCycle:main: FAILED o.e.j.m.p.JettyWebAppContext@3e6534e7{/,[file:/C:/code.point/source/point-web/src/main/webapp/],STARTING}{[file:/C:/code.point/source/point-web/src/main/webapp/]}: java.lang.NoSuchMethodError: net.bull.javamelody.Log4JAppender.setThreshold(Lorg/apache/log4j/Priority;)V
java.lang.NoSuchMethodError: net.bull.javamelody.Log4JAppender.setThreshold(Lorg/apache/log4j/Priority;)V
at net.bull.javamelody.Log4JAppender.<init>(Log4JAppender.java:42)
at net.bull.javamelody.Log4JAppender.<clinit>(Log4JAppender.java:34)
at net.bull.javamelody.FilterContext.initLogs(FilterContext.java:280)
at net.bull.javamelody.FilterContext.<init>(FilterContext.java:69)
at net.bull.javamelody.MonitoringFilter.init(MonitoringFilter.java:110)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:138)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:852)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)
###2. 异常分析 log4j错误;去掉MonitoringFilter的启动正常 原来一直运行正常,最近有哪些改动 增加jar:java-uuid-generator 分析间接依赖 ###3. 解决方案 去掉 java-uuid-generator 的log4j依赖
<dependency>
<groupId>com.fasterxml.uuid</groupId>
<artifactId>java-uuid-generator</artifactId>
<version>3.1.3</version>
<exclusions>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>