Elastic-job encountered in the open source framework using the Rack package conflict error

Source: Internet
Author: User

A new framework was recently run in the department. The framework is the aggregation project for managing jar packages with Maven.


The following error was reported when running a subproject related to Elastic-job.

Exception in thread "main" Org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Com.dangdang.ddframe.job. Spring.schedule.springjobscheduler#0 ': Invocation of Init method failed; Nested exception is Java.lang.IncompatibleClassChangeError:Impleme nting class 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:585) at Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:913) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:464) at org.springframework.context.support.classpathxmlapplicationcontext.< Init> (classpathxmlapplicationcontext.java:139) at Org.springframework.context.support.classpathxmlapplicationcontext.<init> ( classpathxmlapplicationcontext.java:105) at Com.asiainfo.cboss.biz.esjob.JobLauncher.main (joblauncherhttp:// BLOG.CSDN.NET/GUANGLIHUAN/ARTICLE/DETAILS/50512855.JAVA:29)



It can be known by the error message that the error is caused by class Com.dangdang.ddframe.job.spring.schedule.SpringJobScheduler.

And the error indicates that exception is Java.lang.IncompatibleClassChangeError, this error is caused by incompatibility. Find this error on the web, much because of a jar conflict, or if the version is incorrect.


Because it is an open source framework, it is easy to debug the following statement in the Springjobscheduler parent class Jobscheduler that finds the frame's error point.

Jobdetail Jobdetail = Jobbuilder.newjob (Litejob.class). Withidentity (Jobexecutor.getjobname ()). build ();
An error was raised in the function call of Jobbuilder.newjob (). Jobbuilder This class is the class in the Quartz jar package. So the initial judgment was caused by this jar-packet conflict.

After finding this jar package, we found that the MAVEN local library referenced the 2.2.1 and version 1.6.3. However, the 1.6.3 version does not exist in the local pom file, and it is discovered that the jar package is introduced in the Pom file of another subproject that the subproject relies on.

Workaround:

The lower version of the quartz package in the Pom file was temporarily deleted. No conflict errors occur.


This link describes the use of the MAVEN command to view the dependency tree. You can quickly locate the jar package in those project Pom files.

http://blog.csdn.net/guanglihuan/article/details/50512855


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.