当我在hello world应用程序上运行“ mvn quarkus:dev”时,故意使用我们的大父pom,我得到了:
[INFO] --- quarkus-maven-plugin:0.22.0:dev (default-cli) @ my-quarkus-example ---
Listening for transport dt_socket at address: 5005
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.jboss.logmanager.LogContext
at org.jboss.logmanager.LogManager.getLogger(LogManager.java:110)
at org.jboss.logmanager.LogManager.getLogger(LogManager.java:27)
at java.util.logging.LogManager.demandLogger(LogManager.java:551)
at java.util.logging.Logger.demandLogger(Logger.java:455)
...
at org.jboss.logging.Logger.getLogger(Logger.java:2490)
at io.quarkus.dev.DevModeMain.<clinit>(DevModeMain.java:43)
LogManager
和LogContext
都位于jboss-logmanager-embedded-1.0.3.jar
中。我依赖项中的版本与quarkus 0.22.0
pom中的版本匹配。在IntelliJ中,我可以单击从LogManager
到LogContext
。我的hello world应用程序不执行任何日志记录,仅执行hello REST服务。
“ mvn依赖关系:树”的结果:
[INFO] +- io.quarkus:quarkus-resteasy:jar:0.22.0:compile
[INFO] | +- io.quarkus:quarkus-undertow:jar:0.22.0:compile
...
[INFO] | | +- io.quarkus:quarkus-core:jar:0.22.0:compile
...
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | | +- org.jboss.logmanager:jboss-logmanager-embedded:jar:1.0.3:compile
[INFO] | | | +- org.jboss.logging:jboss-logging-annotations:jar:2.1.0.Final:compile
[INFO] | | | +- org.jboss.slf4j:slf4j-jboss-logging:jar:1.2.0.Final:compile
怎么了?
答案 0 :(得分:0)
我们的父母pom
拥有这个:
<dependency>
<groupId>org.wildfly.common</groupId>
<artifactId>wildfly-common</artifactId>
<version>1.2.0.Final</version>
</dependency>
更改为
<dependency>
<groupId>org.wildfly.common</groupId>
<artifactId>wildfly-common</artifactId>
<version>1.5.0.Final-format-001</version>
</dependency>
使夸克错误java.lang.NoClassDefFoundError: Could not initialize class org.jboss.logmanager.LogContext
消失了。