m-bystrova / learning

1 stars 0 forks source link

Exception in thread "main" <...> #2

Closed m-bystrova closed 1 year ago

m-bystrova commented 2 years ago

Can't run simple application, @maximchukmm

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/metrics/ApplicationStartup
    at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:184)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:176)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:193)
    at org.springframework.context.support.GenericApplicationContext.<init>(GenericApplicationContext.java:112)
    at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:65)
    at com.example.spring.SimpleSpringApp.main(SimpleSpringApp.java:8)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.metrics.ApplicationStartup
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 6 more

https://github.com/m-bystrova/learning/blob/d2ad35ffc55b5bb7ed4ab90d1b43c61d48fb4c9c/learning/aboutSpring/src/main/java/com/learning/spring/SimpleSpringApp.java#L8

m-bystrova commented 2 years ago

image I found and solved the problem, now is ok

maximchukmm commented 1 year ago

@m-bystrova close this issue if it's solved.