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

ClassCastException inside devtools with Java 9 #9381

Closed
juergenzimmermann opened this Issue Jun 1, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@juergenzimmermann

juergenzimmermann commented Jun 1, 2017

I'm using Spring Boot 1.5.3.RELEASE with Spring Framework 5.0.0.RC1 and Spring Cloud Dalston.SR1. Because of Spring Cloud I cannot upgrade to Spring Boot 2.0.0.M1.
Now I tried to upgrade from JDK 8 to JDK 9 build 171, but get the following stacktrace:

Exception in thread "main" java.lang.ClassCastException: java.base/jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to java.base/java.net.URLClassLoader
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getUrls(DefaultRestartInitializer.java:93)
        at org.springframework.boot.devtools.restart.DefaultRestartInitializer.getInitialUrls(DefaultRestartInitializer.java:56)
        at org.springframework.boot.devtools.restart.Restarter.<init>(Restarter.java:140)
        at org.springframework.boot.devtools.restart.Restarter.initialize(Restarter.java:546)
        at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationStartingEvent(RestartApplicationListener.java:67)
        at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:45)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:167)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:122)
        at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:68)
        at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:48)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134)
        at de.hska.kunde.Microservice.main(Microservice.java:58)
@snicoll

This comment has been minimized.

Show comment
Hide comment
@snicoll

snicoll Jun 1, 2017

Member

@java 9 isn't supported yet (including Spring Boot 2.0.0.M1), and there is no official support of Spring 5 with Spring Boot 1.x

Duplicates #7226

Member

snicoll commented Jun 1, 2017

@java 9 isn't supported yet (including Spring Boot 2.0.0.M1), and there is no official support of Spring 5 with Spring Boot 1.x

Duplicates #7226

@molzb

This comment has been minimized.

Show comment
Hide comment
@molzb

molzb Aug 25, 2017

[Spring Boot 1.5.6, JDK 9 build 181]
I would be very grateful, if this can be fixed in Spring Boot 1.x.

molzb commented Aug 25, 2017

[Spring Boot 1.5.6, JDK 9 build 181]
I would be very grateful, if this can be fixed in Spring Boot 1.x.

@bclozel

This comment has been minimized.

Show comment
Hide comment
@bclozel

bclozel Aug 25, 2017

Member

@molzb This issue is closed and Stéphane already pointed out that this won't happen. Note: this is not just a case of Spring Boot 1.x supporting JDK9, all managed dependencies should be compatible with it - something that requires a lot of upgrades.

Member

bclozel commented Aug 25, 2017

@molzb This issue is closed and Stéphane already pointed out that this won't happen. Note: this is not just a case of Spring Boot 1.x supporting JDK9, all managed dependencies should be compatible with it - something that requires a lot of upgrades.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment