quarkus构建失败:拦截器没有绑定:org.jboss.solder.exception.control.exceptionhandledinterceptor

jaql4c8m  于 2021-07-08  发布在  Java
关注(0)|答案(1)|浏览(300)

我正在尝试将一个小型公司(mutli模块)resteasy jax-rs应用程序移植到quarkus,但遇到了下面的错误。我检查了应用程序本身的代码,但找不到任何关于焊料异常处理的引用,因此我怀疑它来自外部依赖(有许多公司的依赖我无法控制)。我在互联网上搜索这个特殊的错误,希望它只是一个quarkus依赖或配置,我错过了,但似乎不是这样。或者它还没有在quarkus中实现。
谢谢你的帮助。
操作系统: Ubuntu 18.04 (WSL) java 语: OpenJDK 11.0.8 命令: ./mvnw clean install -DskipTests 错误消息:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.0.Final:build (default) on project <REDACTED>: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.arc.deployment.ArcProcessor#registerBeans threw an exception: javax.enterprise.inject.spi.DefinitionException: Interceptor has no bindings: org.jboss.solder.exception.control.ExceptionHandledInterceptor
[ERROR]         at io.quarkus.arc.processor.Interceptors.createInterceptor(Interceptors.java:44)
[ERROR]         at io.quarkus.arc.processor.BeanDeployment.findInterceptors(BeanDeployment.java:1052)
[ERROR]         at io.quarkus.arc.processor.BeanDeployment.registerBeans(BeanDeployment.java:220)
[ERROR]         at io.quarkus.arc.processor.BeanProcessor.registerBeans(BeanProcessor.java:115)
[ERROR]         at io.quarkus.arc.deployment.ArcProcessor.registerBeans(ArcProcessor.java:381)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:936)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR]         at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :<REDACTED>

更新18/11/2020:依赖本身来自一个我无法控制的公司sdk jar:

[INFO] +- com.<REDACTED>.sdk:sdk-context-core-non-cdi:jar:<REDACTED>:compile
[INFO] |  \- com.<REDACTED>.sdk:sdk-services-core:jar:<REDACTED>:compile
[INFO] |     +- org.jboss.solder:solder-impl:jar:3.2.1.Final:compile
[INFO] |     |  \- org.jboss.solder:solder-api:jar:3.2.1.Final:compile
[INFO] |     |     \- org.jboss.solder:solder-logging:jar:3.2.1.Final:compile
[INFO] |     \- com.google.code.gson:gson:jar:2.3.1:provided

谢谢,埃米尔

cczfrluj

cczfrluj1#

正如@robertocortez所建议的,不包括org.jboss。solder:solder-impl in pom解决了错误:https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html#dependency-除外责任
但是,一旦部署,应用程序可能会产生与缺少的库相关的异常。

相关问题