Skip to content

Method does not exist but caller and callee are in the same jar #2913

@john-allshifts

Description

@john-allshifts

I'm using Spring Boot 3.1.2, Spring 6.0.11, and Java 17. I have confirmed that there is only one spring-data-commons jar on the classpath and that its version matches that of the Spring Boot parent. I have also extracted all of the jar files from the fat jar, expanded them out on the file system, and verified that there is only one org.springframework.data.repository.support.Repositories class in the whole project. It seems like a bug to get an error like this where the caller and the callee are in the same version of the same jar.

***************************
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.data.repository.support.Repositories.loadRepositories(Repositories.java:64)

The following method did not exist:

    'void org.springframework.data.repository.support.Repositories._jr$ip$domainTypeMapping(java.lang.Object, org.springframework.util.ConcurrentLruCache)'

The calling method's class, org.springframework.data.repository.support.Repositories, was loaded from the following location:

    jar:file:/home/john/git/aahcs-backend/target/aahcs-backend-0.0.1-SNAPSHOT-spring-boot.jar!/BOOT-INF/lib/spring-data-commons-3.1.2.jar!/org/springframework/data/repository/support/Repositories.class

The called method's class, org.springframework.data.repository.support.Repositories, is available from the following locations:

    jar:file:/home/john/git/aahcs-backend/target/aahcs-backend-0.0.1-SNAPSHOT-spring-boot.jar!/BOOT-INF/lib/spring-data-commons-3.1.2.jar!/org/springframework/data/repository/support/Repositories.class

The called method's class hierarchy was loaded from the following locations:

    org.springframework.data.repository.support.Repositories: jar:file:/home/john/git/aahcs-backend/target/aahcs-backend-0.0.1-SNAPSHOT-spring-boot.jar!/BOOT-INF/lib/spring-data-commons-3.1.2.jar!/


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.data.repository.support.Repositories

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectFor an external project and not something we can fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions