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

NoSuchMethodError Error starting application #596

Open
mwveelen opened this issue Feb 3, 2025 · 0 comments
Open

NoSuchMethodError Error starting application #596

mwveelen opened this issue Feb 3, 2025 · 0 comments

Comments

@mwveelen
Copy link

mwveelen commented Feb 3, 2025

When I try to run the latest version (after this commit: 1486b8f) of the start-form-springboot project using I get this error:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.boot.autoconfigure.condition.OnBeanCondition and org.springframework.beans.factory.support.AbstractBeanDefinition
Exception in thread "main" java.lang.IllegalStateException: java.lang.NoSuchMethodError: 'boolean org.springframework.beans.factory.support.AbstractBeanDefinition.isDefaultCandidate()'

Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.springframework.boot.autoconfigure.condition.OnBeanCondition.isDefaultCandidate(OnBeanCondition.java:294)
The following method did not exist:
'boolean org.springframework.beans.factory.support.AbstractBeanDefinition.isDefaultCandidate()'
The calling method's class, org.springframework.boot.autoconfigure.condition.OnBeanCondition, was loaded from the following location:
jar:file:/Users/xxx/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/3.4.2/spring-boot-autoconfigure-3.4.2.jar!/org/springframework/boot/autoconfigure/condition/OnBeanCondition.class
The called method's class, org.springframework.beans.factory.support.AbstractBeanDefinition, is available from the following locations:
jar:file:/Users/xxx/.m2/repository/org/springframework/spring-beans/6.1.6/spring-beans-6.1.6.jar!/org/springframework/beans/factory/support/AbstractBeanDefinition.class
The called method's class hierarchy was loaded from the following locations:
org.springframework.beans.factory.support.AbstractBeanDefinition: file:/Users/xxx/.m2/repository/org/springframework/spring-beans/6.1.6/spring-beans-6.1.6.jar
org.springframework.beans.BeanMetadataAttributeAccessor: file:/Users/xxx/.m2/repository/org/springframework/spring-beans/6.1.6/spring-beans-6.1.6.jar
org.springframework.core.AttributeAccessorSupport: file:/Users/xxx/.m2/repository/org/springframework/spring-core/6.2.2/spring-core-6.2.2.jar

commands: mvn spring-boot:run and mvn package exec:java result in same error

I use Java 17, maven 3.8.3/3.9.2

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

No branches or pull requests

1 participant