spring-integration-samples icon indicating copy to clipboard operation
spring-integration-samples copied to clipboard

Getting issue in version mismatch.

Open sayantan2007 opened this issue 5 years ago • 5 comments

I am importing the splunk in separate project then found error from this line

org.springframework.boot spring-boot-starter-parent 2.2.0.BUILD-SNAPSHOT

if I change the version 2.2.0.BUILD-SNAPSHOT to 2.1.6.RELEASE then I can able to build.

org.springframework.boot spring-boot-starter-parent 2.1.6.RELEASE

Now if I run the application then I found following issue


APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.beans.factory.annotation.AnnotatedGenericBeanDefinition.<init>(AnnotatedGenericBeanDefinition.java:58)

The following method did not exist:

org.springframework.core.type.AnnotationMetadata.introspect(Ljava/lang/Class;)Lorg/springframework/core/type/AnnotationMetadata;

The method's class, org.springframework.core.type.AnnotationMetadata, is available from the following locations:

jar:file:/C:/Users/sayan/.m2/repository/org/springframework/spring-core/5.1.8.RELEASE/spring-core-5.1.8.RELEASE.jar!/org/springframework/core/type/AnnotationMetadata.class

It was loaded from the following location:

file:/C:/Users/sayan/.m2/repository/org/springframework/spring-core/5.1.8.RELEASE/spring-core-5.1.8.RELEASE.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.core.type.AnnotationMetadata

sayantan2007 avatar Jul 13 '19 23:07 sayantan2007

What is your POM in that your project? You might need to remove some explicit versions and rely on whatever Spring Boot provides for you.

artembilan avatar Jul 14 '19 17:07 artembilan

pom.txt

sayantan2007 avatar Jul 15 '19 03:07 sayantan2007

You need to change these version in the bottom of your POM to the appropriate from Spring Boot:

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>2.2.0.BUILD-SNAPSHOT</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>5.2.0.M3</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework.integration</groupId>
        <artifactId>spring-integration-bom</artifactId>
        <version>5.2.0.M3</version>
        <scope>import</scope>
        <type>pom</type>

Also I'm not sure why do we need that section at all since typically the single Boot version in the parent definition is fully enough to manage versions properly.

artembilan avatar Jul 15 '19 13:07 artembilan

Hi,

The error APPLICATION FAILED TO START occur during mismatching with Spring dependencies . Please provide the full pom.xml .

Thanks, Mohamad

mohamad7788 avatar Aug 17 '19 20:08 mohamad7788

@mohamad7788 ,

I'm not sure what is your concern in regards to this issue, please, consider to raise SO question or if it is really about this project a fully new with more context to investigate.

It is still not clear for me anyway what we are pursuing in this issue at all... Doesn't look like related to this project or so...

Thanks for uderstanding.

artembilan avatar Aug 19 '19 15:08 artembilan