0

我正在尝试将基于Thorntail + Jakarta EE构建的项目迁移到 Quarkus。

在我的第一个测试中,我发现自定义 CDI 访问存在问题:

11:10:27,381 INFO  [io.qua.dep.QuarkusAugmentor] Beginning quarkus augmentation
11:10:27,559 INFO  [org.jbo.threads] JBoss Threads version 3.0.0.Beta4
11:10:27,709 ERROR [io.qua.dev.DevModeMain] Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.steps.ConfigurationSetup#initializeConfiguration threw an exception: java.lang.IllegalStateException: Unable to locate CDIProvider
        at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:132)
        at io.quarkus.dev.DevModeMain.doStart(DevModeMain.java:166)
        at io.quarkus.dev.DevModeMain.main(DevModeMain.java:88)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
        [error]: Build step io.quarkus.deployment.steps.ConfigurationSetup#initializeConfiguration threw an exception: java.lang.IllegalStateException: Unable to locate CDIProvider
        at io.quarkus.builder.Execution.run(Execution.java:108)
        at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:121)
        at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:104)
        at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:98)
        ... 2 more
Caused by: java.lang.IllegalStateException: Unable to locate CDIProvider
        at javax.enterprise.inject.spi.CDI.findAllProviders(CDI.java:121)
        at javax.enterprise.inject.spi.CDI.getCDIProvider(CDI.java:82)
        at javax.enterprise.inject.spi.CDI.current(CDI.java:64)

我该如何处理这个问题?在不对我的项目进行重大更改的情况下,有什么解决方案吗?

4

0 回答 0