在 Tomee Plume 8.0.9 上使用 CDI(焊接)部署 PF 11 应用程序时出现问题
Problem when deploying PF 11 app with CDI (weld) on Tomee Plume 8.0.9
我正在尝试将 PF6 应用程序迁移到 PF11,在将其部署到 tomee 8.0.9 后,我遇到了以下错误:
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
... 37 more
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type GeronimoOpenAPIExtension with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIFilter.extension
at org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIFilter.extension(OpenAPIFilter.java:0)
Possible dependencies:
- Extension [class org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension] with qualifiers [@Default]; jar:file:/home/chiritda/Software/ntv_3.0/apache-tomee-plume-8.0.9/lib/geronimo-openapi-impl-1.0.12.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension@10c433f7],
- Extension [class org.apache.tomee.microprofile.config.TomEEOpenAPIExtension] with qualifiers [@Default]; jar:file:/home/chiritda/Software/ntv_3.0/apache-tomee-plume-8.0.9/lib/mp-common-8.0.9.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@17[org.apache.tomee.microprofile.config.TomEEOpenAPIExtension@a21441e]
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:386)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
at org.jboss.weld.bootstrap.ConcurrentValidator.doWork(ConcurrentValidator.java:64)
at org.jboss.weld.bootstrap.ConcurrentValidator.doWork(ConcurrentValidator.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:55)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Geronimo 和 TomeeOpenApi 扩展都存在于 tomee 的 lib 目录中。
我正在使用独立的 tomee plume 服务器,java 17.0.1,PF11,WELD 3.1.4。
如有任何想法,我们将不胜感激。
谢谢!
将此移至答案:)
您不应使用 Weld,因为 TomEE 包含 OpenWebBeans。您现在有同一事物 (CDI) 的两个实现,这可能会导致奇怪的问题。
我正在尝试将 PF6 应用程序迁移到 PF11,在将其部署到 tomee 8.0.9 后,我遇到了以下错误:
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
... 37 more
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001409: Ambiguous dependencies for type GeronimoOpenAPIExtension with qualifiers @Default
at injection point [BackedAnnotatedField] @Inject private org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIFilter.extension
at org.apache.geronimo.microprofile.openapi.jaxrs.OpenAPIFilter.extension(OpenAPIFilter.java:0)
Possible dependencies:
- Extension [class org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension] with qualifiers [@Default]; jar:file:/home/chiritda/Software/ntv_3.0/apache-tomee-plume-8.0.9/lib/geronimo-openapi-impl-1.0.12.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@1[org.apache.geronimo.microprofile.openapi.cdi.GeronimoOpenAPIExtension@10c433f7],
- Extension [class org.apache.tomee.microprofile.config.TomEEOpenAPIExtension] with qualifiers [@Default]; jar:file:/home/chiritda/Software/ntv_3.0/apache-tomee-plume-8.0.9/lib/mp-common-8.0.9.jar!/META-INF/services/javax.enterprise.inject.spi.Extension@17[org.apache.tomee.microprofile.config.TomEEOpenAPIExtension@a21441e]
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:386)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526)
at org.jboss.weld.bootstrap.ConcurrentValidator.doWork(ConcurrentValidator.java:64)
at org.jboss.weld.bootstrap.ConcurrentValidator.doWork(ConcurrentValidator.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:55)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Geronimo 和 TomeeOpenApi 扩展都存在于 tomee 的 lib 目录中。
我正在使用独立的 tomee plume 服务器,java 17.0.1,PF11,WELD 3.1.4。
如有任何想法,我们将不胜感激。
谢谢!
将此移至答案:)
您不应使用 Weld,因为 TomEE 包含 OpenWebBeans。您现在有同一事物 (CDI) 的两个实现,这可能会导致奇怪的问题。