You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class GreetingResource {
private static final String CONST = "4";
public void help() {
}
}
I changed the CONST and removed the help method at the same time.
A hot reload triggered the exception from below.
Expected behavior
No exception during hot reload.
Actual behavior
2021-03-26 13:26:19,160 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-15) Changed source files detected, recompiling [C:\workspaces\aviator\hot-reload-static-final\src\main\java\org\acme\GreetingResource.java]
2021-03-26 13:26:19,220 INFO [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-15) Application restart not required, replacing classes via instrumentation
2021-03-26 13:26:19,221 ERROR [io.qua.dep.dev.RuntimeUpdatesProcessor] (vert.x-worker-thread-15) Failed to replace classes via instrumentation: java.lang.UnsupportedOperationException: class redefinition failed: attempted to delete a method
at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses0(Native Method)
at java.instrument/sun.instrument.InstrumentationImpl.redefineClasses(InstrumentationImpl.java:193)
at io.quarkus.deployment.dev.RuntimeUpdatesProcessor.doScan(RuntimeUpdatesProcessor.java:236)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:62)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$2.handle(VertxHttpHotReplacementSetup.java:52)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
Ok, so I was able to reproduce the issue and (1) the comparison logic in ClassComparisonUtil.isSameStructure(ClassInfo, ClassInfo) needs to be fixed to reflect the method removal, (2) the exception is logged but the full restart is perfomed afterwards and the result of the subsequent GET http://localhost:8080/hello is correct.
Describe the bug
I have the following class in my project:
I changed the CONST and removed the
help
method at the same time.A hot reload triggered the exception from below.
Expected behavior
No exception during hot reload.
Actual behavior
To Reproduce
Link to a small reproducer (preferably a Maven project if the issue is not Gradle-specific).
Or attach an archive containing the reproducer to the issue.
Steps to reproduce the behavior:
Environment (please complete the following information):
Output of
uname -a
orver
MSYS_NT-10.0 NANB7NLNVP2 2.10.0(0.325/5/3) 2018-06-13 23:34 x86_64 Msys
Output of
java -version
java version "1.8.0_271"
Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
Quarkus version or git rev
1.13.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\eclipse\tools\apache-maven\bin..
Java version: 11.0.7, vendor: Azul Systems, Inc., runtime: C:\eclipse\tools\zulu11.39.15-ca-jdk11.0.7-win_x64
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
The text was updated successfully, but these errors were encountered: