问题描述:
java.lang.LinkageError: loader constraint violation: when resolving method "javax.mail.internet.MimeBodyPart.setDataHandler(Ljavax/activation/DataHandler;)V" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the current class, org/apache/axiom/om/impl/MIMEOutputUtils, and the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for resolved class, javax/mail/internet/MimeBodyPart, have different Class objects for the type BodyPart.setDataHandler(Ljavax/activation/DataHandler;)V used in the signature
原因:
jar包的问题,有可能是版本的问题导致的
解决方法:
把javax.mail_1.4.0.jar 替换成 mail-1.4.jar
解决java.lang.LinkageError: loader constraint violation: when resolving method "javax.mail.intern
Posted qaz2wsx
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了解决java.lang.LinkageError: loader constraint violation: when resolving method "javax.mail.intern相关的知识,希望对你有一定的参考价值。
以上是关于解决java.lang.LinkageError: loader constraint violation: when resolving method "javax.mail.intern的主要内容,如果未能解决你的问题,请参考以下文章
Tomcat 8 java.lang.LinkageError:违反加载程序约束
Tomcat 加载 jsp 异常:ServletException: java.lang.LinkageError
java.lang.LinkageError:com / sun / xml / messaging / saaj / soap / SOAPDocumentImpl
异常处理_Maven之web项目java.lang.LinkageError
java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader
weblogic???:java.lang.LinkageError: loader constraint violation in interface itable initialization