flow: From 24.5, hotswap is generating a lot of error messages
Description of the bug
Since upgrading to 24.5, when starting the application in debug mode with hotswap i get an endless stream of below log messages for various classes. On 24.4.x this is not happening. Is this a matter of silencing a log category or is this actually an issue? Using hotswap agent 2.0.0.
HOTSWAP AGENT: 13:37:33.332 ERROR (org.hotswap.agent.command.ReflectionCommand) - Error executin method onHotswap in class com.vaadin.flow.hotswap.Hotswapper
java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.GeneratedMethodAccessor139.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.hotswap.agent.command.ReflectionCommand.doExecuteReflectionCommand(ReflectionCommand.java:207)
at org.hotswap.agent.command.ReflectionCommand.executeCommand(ReflectionCommand.java:168)
at org.hotswap.agent.command.impl.CommandExecutor.run(CommandExecutor.java:43)
Caused by: java.lang.NoClassDefFoundError: javax/enterprise/util/AnnotationLiteral
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at com.vaadin.flow.hotswap.Hotswapper.resolveClass(Hotswapper.java:459)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:992)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at com.vaadin.flow.hotswap.Hotswapper.onHotswap(Hotswapper.java:148)
... 6 more
Caused by: java.lang.ClassNotFoundException: javax.enterprise.util.AnnotationLiteral
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
Expected behavior
No error messages
Minimal reproducible example
Use latest hotswap agent and start project in debug mode like usual.
Versions
Vaadin 24.5.2
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 17 (1 by maintainers)
Commits related to this issue
- chore: document hotswap plugin watched-packages setting References vaadin/flow#20389 — committed to vaadin/docs by mcollovati 2 years ago
- fix: prevent hotswap failure if class is not found References #20389 — committed to vaadin/flow by mcollovati 2 years ago
- fix: prevent hotswap failure if class is not found (#20549) References #20389 — committed to vaadin/flow by mcollovati 2 years ago
- fix: prevent hotswap failure if class is not found (#20549) References #20389 — committed to vaadin/flow by mcollovati 2 years ago
- fix: prevent hotswap failure if class is not found (#20549) References #20389 — committed to vaadin/flow by mcollovati 2 years ago
- fix: prevent hotswap failure if class is not found (#20549) (#20557) References #20389 Co-authored-by: Marco Collovati <marco@vaadin.com> — committed to vaadin/flow by vaadin-bot 2 years ago
- fix: prevent hotswap failure if class is not found (#20549) (#20556) References #20389 Co-authored-by: Marco Collovati <marco@vaadin.com> — committed to vaadin/flow by vaadin-bot 2 years ago
- chore: document hotswap plugin watched-packages setting (#3916) * chore: document hotswap plugin watched-packages setting References vaadin/flow#20389 * Update hotswap-agent.adoc * apply rev... — committed to vaadin/docs by mcollovati 2 years ago
Note that in order to trigger the stacktraces again and see which classes are causing it, I had to remove the
vaadin.watched-packagesconfiguration again. With that config set to the root package of the application, the stacktraces are gone.Environment is latest spring-boot with embedded tomcat.
tree.txt