You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/06/05 14:39:00 UTC
[jira] [Work logged] (TOMEE-4350) mp-jwt: Add qualifier for produced Jsonb
[ https://issues.apache.org/jira/browse/TOMEE-4350?focusedWorklogId=922203&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-922203 ]
ASF GitHub Bot logged work on TOMEE-4350:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 05/Jun/24 14:38
Start Date: 05/Jun/24 14:38
Worklog Time Spent: 10m
Work Description: jungm opened a new pull request, #1189:
URL: https://github.com/apache/tomee/pull/1189
resolves https://issues.apache.org/jira/browse/TOMEE-4350
Issue Time Tracking
-------------------
Worklog Id: (was: 922203)
Remaining Estimate: 0h
Time Spent: 10m
> mp-jwt: Add qualifier for produced Jsonb
> ----------------------------------------
>
> Key: TOMEE-4350
> URL: https://issues.apache.org/jira/browse/TOMEE-4350
> Project: TomEE
> Issue Type: Improvement
> Components: TomEE Core Server
> Affects Versions: 10.0.0-M1, 9.1.3
> Reporter: Markus Jung
> Priority: Minor
> Attachments: reproducer.zip
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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):
> {code:java}
> 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
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)