MAVEN's package dependency violation can cause Java.lang.IncompatibleClassChangeError errors

Source: Internet
Author: User

After the new API is online, the log file is not properly exported. View Tomcat's log file to find the following error message

 in  - 7:  com.sun.xml.ws.server.sei.EndpointMethodHandler invoke                                    Severe:found Class Ch.qos.logback.core.spi.CyclicBufferTracker, but interface was expected                                    Java.lang.IncompatibleClassChangeError:Found class Ch.qos.logback.core.spi.CyclicBufferTracker, but interface was Expected    

From the literal meaning analysis, the virtual machine expects to use a interface type of cyclicbuffertracker, actually load comes in a class type. This problem is typically caused by inconsistencies in the jar package version used by compile and runtime. This version is inconsistent, generally due to Maven's packet dependency conflict.

Ch.qos.logback.core.spi.CyclicBufferTracker is a class in Logback-core, and through Eclipse's dependency hierarchy tool, For package dependencies in Pom.xml, use the Logback-core keyword for filter:

It is true that a referenced dependency package was found to be dependent on the 1.0.3 version of the Logback-core, and the 1.1.2 version that the project relied on, created a conflict.

According to the project needs, adjust the Pom file to select the required jar version, resolve the package dependency conflict, you can resolve the java.lang.IncompatibleClassChangeError problem.

MAVEN's package dependency violation can cause Java.lang.IncompatibleClassChangeError errors

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.