Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting issue in version mismatch. #272

Open
sayantan2007 opened this issue Jul 13, 2019 · 5 comments
Open

Getting issue in version mismatch. #272

sayantan2007 opened this issue Jul 13, 2019 · 5 comments

Comments

@sayantan2007
Copy link

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

@artembilan
Copy link
Member

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.

@sayantan2007
Copy link
Author

pom.txt

@artembilan
Copy link
Member

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.

@mohamad7788
Copy link

Hi,

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

Thanks,
Mohamad

@artembilan
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants