maven依赖冲突排除转载
原创引用一个jar我在包裹后报告了一个错误。
java.lang.LinkageError: loader constraint violation: when resolving method "org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(Ljavax/servlet/ServletConfig;)Lorg/apache/tomcat/InstanceManager;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/WEB_002dINF/views/admin/main_jsp, and the class loader (instance of java/net/URLClassLoader) for the methods defining class, org/apache/jasper/runtime/InstanceManagerFactory, have different Class objects for the type org/apache/tomcat/InstanceManager used in the signature
打印大量时出错,请查找关键字have different Class objects for the type org/apache/tomcat/InstanceManager
有不同的类对象org/apache/tomcat/InstanceManager,加载多个相同的类将会出错,因为maven由此产生的转移依赖
一看是tomcat关于包冲突,打开jar包依赖关系树,查找冲突的包
所选冲突jar包右键exclude maven artifact只要知道具体的包名就可以直接在pom中手动写exclusion
————————————————
版权声明:本文是CSDN博主「HSuperYue“原文,跟上。CC 4.0 by-sa版权协议,转载请附上原始来源链接和本声明。
原始链接:https://blog.csdn.net/qq632680822/article/details/80747704
版权声明
所有资源都来源于爬虫采集,如有侵权请联系我们,我们将立即删除