Re: TomEE 9.1.3 to 10.0.1 issue
Richard Zowalla <[email protected]> Mon, 2 Jun 2025 21:22:52 +0200
| Newsgroups | gmane.comp.java.openejb.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_70568CDE-AF53-4BC3-AB67-960972CB4F22 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, I think your scenario is available as an example here: = https://github.com/apache/tomee/tree/main/examples/mp-rest-jwt-principal Gru=C3=9F Richard > Am 02.06.2025 um 19:08 schrieb COURTAULT Francois = <[email protected]>: >=20 > THALES GROUP LIMITED DISTRIBUTION to email recipients >=20 > Hello everyone, >=20 > I want to run one sample app in TomEE Plus 10.0.1. >=20 > This app is running fine when using TomEE 9.1.3. >=20 > First question is about the pom.xml > When on TomEE 9.1.3, I have in my pom these dependencies: > <dependency> > <groupId>jakarta.platform</groupId> > <artifactId>jakarta.jakartaee-api</artifactId> > <version>9.1.0</version> > <scope>provided</scope> > </dependency> >=20 > <dependency> > <groupId>org.eclipse.microprofile.jwt</groupId> > <artifactId>microprofile-jwt-auth-api</artifactId> > <version>2.0</version> > <scope>provided</scope> > </dependency> >=20 > <dependency> > <groupId>org.apache.tomee</groupId> > <artifactId>mp-jwt</artifactId> > <version>9.1.3</version> > <scope>provided</scope> > </dependency> >=20 > So when I switch to TomEE 10.0.1, so from Jakarta 9.1 to 10, do I have = to update all these versions ? >=20 > * from 9.1.0 to 10.0.0 for jakarta.jakartaee-api > * from 2.0 to 2.1 for jwt-auth-api > * from 9.1.3 to 10.0.1 for mp-jwt >=20 > Second question, why I got this kind of following errors ? > 02-Jun-2025 18:54:05.535 SEVERE [main] = org.apache.openejb.cdi.OpenEJBLifecycle.startApplication CDI Beans = module deployment failed > org.apache.webbeans.exception.WebBeansDeploymentException: = jakarta.enterprise.inject.UnsatisfiedResolutionException: Api type = [org.eclipse.microprofile.jwt.JsonWebToken] is not found with the = qualifiers >=20 > In my source JAX-RS resource code I have: >=20 > import org.eclipse.microprofile.jwt.JsonWebToken; >=20 > import jakarta.annotation.security.RolesAllowed; > import jakarta.enterprise.context.RequestScoped; >=20 > import jakarta.inject.Inject; >=20 > import jakarta.ws.rs.GET; > import jakarta.ws.rs.Path; > import jakarta.ws.rs.core.Response; >=20 > @Path("resources") > @RequestScoped > public class MPJwtResource { > @Inject > private JsonWebToken callerPrincipal; > ... > @GET > @RolesAllowed("myrole") > public Response test () { > System.out.println("JsonWebToken:" + = callerPrincipal + "."); > return Response.ok().build(); > } > } >=20 > Best Regards. >=20 >=20 >=20 >=20 --Apple-Mail=_70568CDE-AF53-4BC3-AB67-960972CB4F22--