Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
172 views
in Technique[技术] by (71.8m points)

java - I can't start this file which i downloaded for an academic project, show missing method error

This file came with missing dependencies and now i'm stuck. What am i missing?

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/Claudio/.m2/repository/ch/qos/logback/logback- 
classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/Claudio/.m2/repository/org/slf4j/slf4j- 
log4j12/1.6.6/slf4j-log4j12-1.6.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.

  .   ____          _            __ _ _
 /\ / ___'_ __ _ _(_)_ __  __ _    
( ( )\___ | '_ | '_| | '_ / _` |    
 \/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
[32m :: Spring Boot :: [39m      [2m (v2.3.2.RELEASE)[0;39m

[2m2021-01-27 11:37:36.187[0;39m [32m INFO[0;39m [35m16692[0;39m [2m---[0;39m [2m[           
main][0;39m [36msim1.awakelab.sim1Application           [0;39m [2m:[0;39m Starting 
sim1Application on DESKTOP-MTELQ59 with PID 16692 
(C:UsersClaudioDocumentsProgramaciónSimulacrossim1argetclasses started by Claudio in 
C:UsersClaudioDocumentsProgramaciónSimulacrossim1)
[2m2021-01-27 11:37:36.189[0;39m [32m INFO[0;39m [35m16692[0;39m [2m---[0;39m [2m[           
main][0;39m [36msim1.awakelab.sim1Application           [0;39m [2m:[0;39m No active profile set, 
falling back to default profiles: default
[2m2021-01-27 11:37:36.279[0;39m [31mERROR[0;39m [35m16692[0;39m [2m---[0;39m [2m[           
main][0;39m [36mo.s.b.d.LoggingFailureAnalysisReporter  [0;39m [2m:[0;39m 

***************************
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.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors
(PostProcessorRegistrationDelegate.java:99)

The following method did not exist:

'org.springframework.core.metrics.ApplicationStartup org.springframework.beans.factory.config.ConfigurableListableBeanFactory.getApplicationStartup()'

The method's class, org.springframework.beans.factory.config.ConfigurableListableBeanFactory, is 
available from the following locations:

jar:file:/C:/Users/Claudio/.m2/repository/org/springframework/spring-beans/5.2.8.RELEASE/spring- 
beans- 
5.2.8.RELEASE.jar!/org/springframework/beans/factory/config/ConfigurableListableBeanFactory.class

The class hierarchy was loaded from the following locations:

org.springframework.beans.factory.config.ConfigurableListableBeanFactory: 
file:/C:/Users/Claudio/.m2/repository/org/springframework/spring-beans/5.2.8.RELEASE/spring-beans- 
5.2.8.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of 
org.springframework.beans.factory.config.ConfigurableListableBeanFactory

I don't know if i'm missing some config file or what, but i've already created the main class and method with the annotation SpringBootApplication and added the spring core dependency.

question from:https://stackoverflow.com/questions/65923148/i-cant-start-this-file-which-i-downloaded-for-an-academic-project-show-missing

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have incompatible version of ConfigurableListableBeanFactory method .

Try adding the following in your pom.xml (if the dependency does not exist)

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  <version>2.3.2.RELEASE</version>
</dependency>

If you have the dependency , check whether it is same as Spring version

Edited

Go to C:/Users/Claudio/.m2/repository/org/springframework/spring-context . Check if you have multiple versions of spring-context , like 5.2.8.RELEASE and other versions along with it. If you have too many versions, delete everything except the one with 2.3.2 . Because it seems, other version files are being read instead of the actual one.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...