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
Describe the bug
A multi-module maven project contains two submodules mod1 and mod2, where mod2 depends on mod1.
When running mod2 in dev mode, NoClassDefFoundError occurs for a route class from mod1.
The error does not occur when the application is built with mvn package and run with java -jar mod2/target/mod2-0.0.1-SNAPSHOT-runner.jar.
Expected behavior
The application should work no matter if it is run in dev mode or not.
Actual behavior
If the application is started with mvn compile quarkus:dev -pl mod2, an internal server error is returned when a request is made to a route in mod1. Both the log and the HTTP response contain a stacktrace:
2021-02-20 02:39:39,613 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-3) HTTP Request to /mod1/ failed, error id: d2ed3e7e-337e-4fcf-9c6e-eddc7944cecc-1: java.lang.NoClassDefFoundError: sg/wjtan/mod1/IndexPage
at sg.wjtan.mod1.IndexPage_RouteHandler_index_279c3f7d45b3461bf7246354cb951cebf8120d77.invoke(IndexPage_RouteHandler_index_279c3f7d45b3461bf7246354cb951cebf8120d77.zig:104)
at io.quarkus.vertx.web.runtime.RouteHandler.handle(RouteHandler.java:97)
at io.quarkus.vertx.web.runtime.RouteHandler.handle(RouteHandler.java:22)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:101)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$17.handle(VertxHttpRecorder.java:1121)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$17.handle(VertxHttpRecorder.java:1092)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:137)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$4.handle(VertxHttpRecorder.java:333)
at io.quarkus.vertx.http.runtime.VertxHttpRecorder$4.handle(VertxHttpRecorder.java:311)
at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1038)
at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:137)
at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:132)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$3.handle(VertxHttpHotReplacementSetup.java:86)
at io.quarkus.vertx.http.runtime.devmode.VertxHttpHotReplacementSetup$3.handle(VertxHttpHotReplacementSetup.java:75)
at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:327)
at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: sg.wjtan.mod1.IndexPage
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:428)
at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:378)
... 28 more
Describe the bug
A multi-module maven project contains two submodules mod1 and mod2, where mod2 depends on mod1.
When running mod2 in dev mode,
NoClassDefFoundError
occurs for a route class from mod1.The error does not occur when the application is built with
mvn package
and run withjava -jar mod2/target/mod2-0.0.1-SNAPSHOT-runner.jar
.Expected behavior
The application should work no matter if it is run in dev mode or not.
Actual behavior
If the application is started with
mvn compile quarkus:dev -pl mod2
, an internal server error is returned when a request is made to a route in mod1. Both the log and the HTTP response contain a stacktrace:To Reproduce
Steps to reproduce the behavior:
mvn install
mvn compile quarkus:dev -pl mod2
Environment (please complete the following information):
uname -a
orver
: Windows 10 20H2java -version
: java 11.0.10 2021-01-19 LTSmvnw --version
orgradlew --version
): Maven 3.6.3The text was updated successfully, but these errors were encountered: