Open dsyer opened 10 years ago
I believe this is due to $Proxy types not being automatically being considered reloadable with more recent JDKs because more recent JDKs are adding a package prefix (older JDKs did not). Please try it with a 1.2.0.BUILD-SNAPSHOT which contains the most recent fixes for this.
Still broken with 1.2.0.BUILD-SNAPSHOT. Should I concentrate on a specific JVM micro version? (Eberhard reports it failing with Java 7 and 8.)
Also I can confirm what @ewolff reported: it works with a vanilla "java" launcher (and also with "mvn spring-boot:run" but only if you add the agent in MAVEN_OPTS), but not with the "embedded" agent attach in the Maven plugin. Maybe we need some help in the plugin?
I currently would try to fix issues around the most recent micro versions of Java7 and Java8 - this issue isn't related to changes in micro versions though.
Is the spring-boot:run case still adding the agent 'late' ? might be a factor here.
Just saw the comment on the other bug. Yes most likely attaching the agent late is the problem. Some system classes need to be modified, if they happen to get loaded earlier than the agent is attached, SL can't do its job. I'm hesitant to dive into trying to find a way to solve late agent attachment because it'll add even more complexity to the system.
I could reproduce the NoSuchMethodError both with 1.2.1.BUILD-SNAPSHOT and 1.2.0.RELEASE (on Java 8). Interestingly, the error does not occur when using the Spring Boot Gradle plugin.
Interestingly, the error does not occur when using the Spring Boot Gradle plugin.
So what is the difference here? Is it a difference between forking and not forking the process? In the former case where the agent can be added from JVM start, things are going to work so much better.
I imagine that's the difference. Upgrade to the 1.1.0 snapshots (M1 out later this week) if you want to use Maven.
I see other (possibly related) Spring Data issues (#18, #53), but neither seems identical. This one is easy to reproduce as well:
See also https://github.com/spring-projects/spring-boot/issues/648