Thanks @Roberto, I pull the latest master that include your fix and yes,
now is working like a charm.

I have one question,
Yesterday I tried to move the:

<activation>
  <activeByDefault>true</activeByDefault>
</activation>


from profile <id>arquillian-tomee-embedded</id> into
<id>arquillian-tomee-remote</id> and that didn't work.
By looking at your fix, Why we need to explicitly add (even with provided
scope)  mp-jwt dependency for Remote profile if we already are including
apache-tomee with microprofile classifier?

<profile>
  <id>arquillian-tomee-remote</id>
  <activation>
    <activeByDefault>true</activeByDefault>
  </activation>
  <dependencies>
    <dependency>
      <groupId>org.apache.tomee</groupId>
      <artifactId>arquillian-tomee-remote</artifactId>
      <version>${tomee.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomee</groupId>
      <artifactId>apache-tomee</artifactId>
      <version>${tomee.version}</version>
      <type>zip</type>
      <classifier>microprofile</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.tomee</groupId>
      <artifactId>mp-jwt</artifactId>
      <version>${tomee.version}</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</profile>









El jue., 13 dic. 2018 a las 10:04, Roberto Cortez
(<[email protected]>) escribió:

> Hi César,
>
> Just fixed the issue.
>
> The sample was running with TomEE Embedded which doesn’t ship with MP
> impls by default. The JWT library was being added manually. When I added
> the Config API it started failing with ClassNotFound. I’ve removed TomEE
> Embedded and now it only uses TomEE Remote to run the sample.
>
> Hope it helps.
>
> Cheers,
> Roberto
>
> > On 13 Dec 2018, at 15:40, César Hernández Mendoza <[email protected]>
> wrote:
> >
> > Yes, I need help.
> > I pull lates master that includes the latest fixes from Otavio [1] but
> still the mp-rest-jwt is failing with the same exception I shared in the
> previous email.
> >
> > [1]
> >
> >
> > El jue., 13 dic. 2018 a las 4:11, Jean-Louis Monteiro (<
> [email protected] <mailto:[email protected]>>) escribió:
> > Hey Cesar,
> >
> > I have fixed a compilation issue after the MP work has been merged.
> > Lemme know if you need some help with this and I'm happy to help
> > --
> > Jean-Louis Monteiro
> > http://twitter.com/jlouismonteiro <http://twitter.com/jlouismonteiro>
> > http://www.tomitribe.com <http://www.tomitribe.com/>
> >
> >
> > On Thu, Dec 13, 2018 at 7:10 AM César Hernández Mendoza <
> > [email protected] <mailto:[email protected]>> wrote:
> >
> > > Hi @Jean-Louis,
> > >
> > > The fix you did solve the general build if the test is skipt, but
> today I
> > > was starting to work on TOMEE-2357 [1] but when I pull the latest
> master,
> > > now the mp-rest-jwt example[2] PR you merged today is broken:
> > >
> > > I've attached the entire log. But the first exception present is:
> > > Dec 12, 2018 10:19:24 PM org.apache.webbeans.plugins.PluginLoader
> startUp
> > > INFO: Adding OpenWebBeansPlugin : [CdiPlugin]
> > > Dec 12, 2018 10:19:25 PM org.apache.webbeans.config.BeansDeployer
> > > deploySingleAnnotatedType
> > > WARNING: Skipping deployment of Class class
> > >
> org.apache.tomee.microprofile.jwt.config.ConfigurableJWTAuthContextInfo due
> > > to a NoClassDefFoundError: Lorg/eclipse/microprofile/config/Config;
> > > Dec 12, 2018 10:19:25 PM org.apache.openejb.cdi.OpenEJBLifecycle
> > > startApplication
> > > SEVERE: CDI Beans module deployment failed
> > > org.apache.webbeans.exception.WebBeansDeploymentException:
> > > javax.enterprise.inject.UnsatisfiedResolutionException: Api type
> > >
> [org.apache.tomee.microprofile.jwt.config.ConfigurableJWTAuthContextInfo]
> > > is not found with the qualifiers
> > > Qualifiers: [@javax.enterprise.inject.Default()]
> > > for injection into Field Injection Point, field name :
> > > configurableJWTAuthContextInfo, Bean Owner : [MPJWTFilter,
> > > WebBeansType:MANAGED, Name:null, API
> > >
> Types:[org.apache.tomee.microprofile.jwt.MPJWTFilter,javax.servlet.Filter,java.lang.Object],
> > >
> Qualifiers:[javax.enterprise.inject.Default,javax.enterprise.inject.Any]]
> > > at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:356)
> > > at
> > >
> org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:196)
> > > at
> > >
> org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:229)
> > >
> > > I notice that the PR for TOMEE-2247 - MicroProfile JWT Propagation 1.1
> [3]
> > > was merged a couple days ago so I tried to upgrade in the mp-rest-jwt
> pom
> > > file from <mp-jwt.version>1.0</mp-jwt.version>
> > > to  <mp-jwt.version>1.1.1</mp-jwt.version> but still the example test
> > > failed.
> > >
> > > At this point, I'm blocked to move forward TOMEE-2357 since I don't
> know
> > > the internals of the JWT implementation we currently have on master.
> > > Any help or pointers are more than welcome :)
> > >
> > > [1] TOMEE-2357 - MicroProfile JWT @RolesAllowed is been applied with an
> > > all or nothing policy
> > > [2] https://github.com/apache/tomee/tree/master/examples/mp-rest-jwt <
> https://github.com/apache/tomee/tree/master/examples/mp-rest-jwt>
> > > [3] https://github.com/apache/tomee/pull/173 <
> https://github.com/apache/tomee/pull/173>
> > >
> > > El mié., 12 dic. 2018 a las 18:39, Jean-Louis Monteiro (<
> > > [email protected] <mailto:[email protected]>>) escribió:
> > >
> > >> Of course
> > >>
> > >> Le mer. 12 déc. 2018 à 23:28, Roberto Cortez
> <[email protected]
> > >> >
> > >> a écrit :
> > >>
> > >> > Yeah, sorry I got it.
> > >> >
> > >> > > On 12 Dec 2018, at 16:55, Jean-Louis Monteiro <
> > >> [email protected] <mailto:[email protected]>>
> > >> > wrote:
> > >> > >
> > >> > > Yes, here is the fix
> > >> > >
> > >> >
> > >>
> https://github.com/apache/tomee/commit/c17b93cb644bc7cbdd463d59ccfbf6a08998553f
> <
> https://github.com/apache/tomee/commit/c17b93cb644bc7cbdd463d59ccfbf6a08998553f
> >
> > >> > >
> > >> > > --
> > >> > > Jean-Louis Monteiro
> > >> > > http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > > http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >
> > >> > >
> > >> > > On Wed, Dec 12, 2018 at 12:44 PM Roberto Cortez
> > >> > <[email protected]>
> > >> > > wrote:
> > >> > >
> > >> > >> Hey JL,
> > >> > >>
> > >> > >> Were you able to fix the issue?
> > >> > >>
> > >> > >>> On 11 Dec 2018, at 09:03, Jean-Louis Monteiro <
> > >> > [email protected] <mailto:[email protected]>>
> > >> > >> wrote:
> > >> > >>>
> > >> > >>> I think I found the bug on this one. Let's open a PR and then
> if you
> > >> > >> could
> > >> > >>> give me your thoughts
> > >> > >>> --
> > >> > >>> Jean-Louis Monteiro
> > >> > >>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>
> > >> > >>>
> > >> > >>> On Mon, Dec 10, 2018 at 5:27 PM Jean-Louis Monteiro <
> > >> > >>> [email protected] <mailto:[email protected]>>
> wrote:
> > >> > >>>
> > >> > >>>> If you have some pointers, I'm happy to look at the issue. I'll
> > >> > probably
> > >> > >>>> learn something.
> > >> > >>>> --
> > >> > >>>> Jean-Louis Monteiro
> > >> > >>>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>>
> > >> > >>>>
> > >> > >>>> On Mon, Dec 10, 2018 at 5:27 PM Jonathan Gallimore <
> > >> > >>>> [email protected] <mailto:
> [email protected]>> wrote:
> > >> > >>>>
> > >> > >>>>> Ok, sounds like something has gone wrong somewhere.  Do you
> want
> > >> to
> > >> > >> look
> > >> > >>>>> or
> > >> > >>>>> do you want me to?
> > >> > >>>>>
> > >> > >>>>> On Mon, 10 Dec 2018, 16:21 Jean-Louis Monteiro <
> > >> > >> [email protected] <mailto:[email protected]>
> > >> > >>>>> wrote:
> > >> > >>>>>
> > >> > >>>>>> In core yes for sure, but I've seen in the tomee-embedded
> module
> > >> as
> > >> > >> well
> > >> > >>>>>> (need to check this one though)
> > >> > >>>>>> --
> > >> > >>>>>> Jean-Louis Monteiro
> > >> > >>>>>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>>>>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>>>>
> > >> > >>>>>>
> > >> > >>>>>> On Mon, Dec 10, 2018 at 5:05 PM Jonathan Gallimore <
> > >> > >>>>>> [email protected] <mailto:
> [email protected]>> wrote:
> > >> > >>>>>>
> > >> > >>>>>>> Was it in openejb-core or the jwt TCK?
> > >> > >>>>>>>
> > >> > >>>>>>> I'm sure the latter was working.
> > >> > >>>>>>>
> > >> > >>>>>>> On Mon, 10 Dec 2018, 15:56 Jean-Louis Monteiro <
> > >> > >>>>> [email protected] <mailto:[email protected]>
> > >> > >>>>>>> wrote:
> > >> > >>>>>>>
> > >> > >>>>>>>> I'll pull from master and rebuild the whole thing here
> > >> > >>>>>>>> Gimme 30 minutes
> > >> > >>>>>>>>
> > >> > >>>>>>>> --
> > >> > >>>>>>>> Jean-Louis Monteiro
> > >> > >>>>>>>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>>>>>>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>> On Mon, Dec 10, 2018 at 4:55 PM Jonathan Gallimore <
> > >> > >>>>>>>> [email protected] <mailto:
> [email protected]>> wrote:
> > >> > >>>>>>>>
> > >> > >>>>>>>>> It _was_ working ok. Where are you seeing that exception?
> > >> > >>>>>>>>>
> > >> > >>>>>>>>> On Mon, 10 Dec 2018, 15:52 Jean-Louis Monteiro <
> > >> > >>>>>>> [email protected] <mailto:[email protected]>
> > >> > >>>>>>>>> wrote:
> > >> > >>>>>>>>>
> > >> > >>>>>>>>>> This is after I merged the PR from Roberto on JWT yes.
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>> Caused by: java.lang.ClassCastException: Cannot cast
> > >> > >>>>>>>>> com.sun.proxy.$Proxy55
> > >> > >>>>>>>>>> to java.security.Principal
> > >> > >>>>>>>>>> at java.lang.Class.cast(Class.java:3369)
> > >> > >>>>>>>>>> at
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>
> > >> > >>>>>>
> > >> > >>>>>
> > >> > >>
> > >> >
> > >>
> org.apache.openejb.cdi.ManagedSecurityService.<init>(ManagedSecurityService.java:64)
> > >> > >>>>>>>>>> at
> > >> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > >> > >>>>>>>> Method)
> > >> > >>>>>>>>>> at
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>
> > >> > >>>>>>
> > >> > >>>>>
> > >> > >>
> > >> >
> > >>
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> > >> > >>>>>>>>>> at
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>
> > >> > >>>>>>
> > >> > >>>>>
> > >> > >>
> > >> >
> > >>
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > >> > >>>>>>>>>> at
> > >> > >>>>>
> java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> > >> > >>>>>>>>>> at
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>
> > >> > >>>>>>
> > >> > >>>>>
> > >> > >>
> > >> >
> > >>
> org.apache.webbeans.config.WebBeansContext.createInstance(WebBeansContext.java:440)
> > >> > >>>>>>>>>> --
> > >> > >>>>>>>>>> Jean-Louis Monteiro
> > >> > >>>>>>>>>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>>>>>>>>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>> On Mon, Dec 10, 2018 at 4:51 PM Jonathan Gallimore <
> > >> > >>>>>>>>>> [email protected] <mailto:
> [email protected]>> wrote:
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>>> What's the context? JWT?
> > >> > >>>>>>>>>>>
> > >> > >>>>>>>>>>> Jon
> > >> > >>>>>>>>>>>
> > >> > >>>>>>>>>>> On Mon, 10 Dec 2018, 15:28 Jean-Louis Monteiro <
> > >> > >>>>>>>>> [email protected] <mailto:[email protected]
> >
> > >> > >>>>>>>>>>> wrote:
> > >> > >>>>>>>>>>>
> > >> > >>>>>>>>>>>> Hey Jon,
> > >> > >>>>>>>>>>>>
> > >> > >>>>>>>>>>>> I think you worked on this issue. What's the status?
> > >> > >>>>>>>>>>>> Do you have some inputs?
> > >> > >>>>>>>>>>>> --
> > >> > >>>>>>>>>>>> Jean-Louis Monteiro
> > >> > >>>>>>>>>>>> http://twitter.com/jlouismonteiro <
> http://twitter.com/jlouismonteiro>
> > >> > >>>>>>>>>>>> http://www.tomitribe.com <http://www.tomitribe.com/>
> > >> > >>>>>>>>>>>>
> > >> > >>>>>>>>>>>
> > >> > >>>>>>>>>>
> > >> > >>>>>>>>>
> > >> > >>>>>>>>
> > >> > >>>>>>>
> > >> > >>>>>>
> > >> > >>>>>
> > >> > >>>>
> > >> > >>
> > >> > >>
> > >> >
> > >> >
> > >>
> > >
> > >
> > > --
> > > Atentamente:
> > > César Hernández Mendoza.
> > >
> >
> >
> > --
> > Atentamente:
> > César Hernández Mendoza.
>
>

-- 
Atentamente:
César Hernández Mendoza.

Reply via email to