Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
10.0.0-M1, 9.1.3
-
None
Description
JsonbProducer currently produces an unqalified Jsonb, making it impossible for the application to define its own producer: https://github.com/apache/tomee/blob/tomee-project-10.0.0-M1/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/cdi/JsonbProducer.java
This results in the following deployment error when OWB starts up (reproducer attached):
05-Jun-2024 15:48:31.010 SEVERE [main] org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans module deployment failed org.apache.webbeans.exception.WebBeansDeploymentException: jakarta.enterprise.inject.AmbiguousResolutionException: There is more than one Bean with type jakarta.json.bind.Jsonb Qualifiers: [@jakarta.enterprise.inject.Default()] for injection into Field Injection Point, field name : jsonb, Bean Owner : [ExampleBean, WebBeansType:MANAGED, Name:null, API Types:[java.lang.Object,org.example.ExampleBean], Qualifiers:[jakarta.enterprise.inject.Default,jakarta.enter prise.inject.Any]] found beans: Jsonb, WebBeansType:PRODUCERMETHOD, Name:null, API Types:[java.lang.Object,jakarta.json.bind.Jsonb,java.lang.AutoCloseable], Qualifiers:[jakarta.enterprise.inject.Default,jakarta.enterprise.inject.Any], Producer Method: public jakarta.j son.bind.Jsonb org.example.JsonbProducer.createJsonb() from file:/home/markus/tmp/tomee-jsonb-unqalified/target/apache-tomee/webapps/tomee-embedded-mp-1.0-SNAPSHOT/WEB-INF/classes/org/example/JsonbProducer.class Jsonb, WebBeansType:PRODUCERMETHOD, Name:null, API Types:[java.lang.Object,jakarta.json.bind.Jsonb,java.lang.AutoCloseable], Qualifiers:[jakarta.enterprise.inject.Default,jakarta.enterprise.inject.Any], Producer Method: public jakarta.j son.bind.Jsonb org.apache.tomee.microprofile.jwt.cdi.JsonbProducer.create() from jar:file:/home/markus/tmp/tomee-jsonb-unqalified/target/apache-tomee/lib/mp-jwt-10.0.0-M1.jar!/org/apache/tomee/microprofile/jwt/cdi/JsonbProducer.class