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 error when executing 'just run' with a Spring Boot 2.7.5 (Kotlin) application #24

Closed
lucasleon2107 opened this issue Dec 24, 2022 · 1 comment

Comments

@lucasleon2107
Copy link

lucasleon2107 commented Dec 24, 2022

I'm getting this error:

spring | Attaching agents: []
spring | Exception in thread "main" java.lang.IllegalArgumentException: Cannot instantiate interface org.springframework.boot.SpringApplicationRunListener : com.maciejwalkowiak.just.spring.boot.DevcontainersRunListener
spring |        at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:449)
spring |        at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:431)
spring |        at org.springframework.boot.SpringApplication.getRunListeners(SpringApplication.java:419)
spring |        at org.springframework.boot.SpringApplication.run(SpringApplication.java:298)
spring |        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
spring |        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
spring |        at com.test.ApplicationKt.main(Application.kt:17)
spring | Caused by: java.lang.UnsupportedClassVersionError: com/maciejwalkowiak/just/spring/boot/DevcontainersRunListener has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
spring |        at java.lang.ClassLoader.defineClass1(Native Method)
spring |        at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
spring |        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
spring |        at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
spring |        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
spring |        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
spring |        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
spring |        at java.security.AccessController.doPrivileged(Native Method)
spring |        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
spring |        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
spring |        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
spring |        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
spring |        at java.lang.Class.forName0(Native Method)
spring |        at java.lang.Class.forName(Class.java:348)
spring |        at org.springframework.util.ClassUtils.forName(ClassUtils.java:284)
spring |        at org.springframework.boot.SpringApplication.createSpringFactoriesInstances(SpringApplication.java:442)
spring |        ... 6 more
spring | ------------------------------------------------------------------------
spring | BUILD FAILURE
spring | ------------------------------------------------------------------------
spring | Total time:  16.419 s
spring | Finished at: 2022-12-23T23:39:11-05:00
spring | ------------------------------------------------------------------------
@maciejwalkowiak
Copy link
Owner

maciejwalkowiak commented Dec 24, 2022

I see you're using Java 8. Just requires Java 11+

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

2 participants