Re: Metrics Gauge Example and Bug

2018-11-26 Thread Bruno Baptista

Sure,

Will have a look after lunch.

Cheers.

Bruno Baptista
https://twitter.com/brunobat_


On 26/11/18 13:29, Ivan Junckes Filho wrote:

Bruno, can you review again please?

On Mon, Nov 26, 2018 at 10:46 AM Ivan Junckes Filho 
wrote:


Awesome, thanks Bruno

On Mon, Nov 26, 2018 at 10:23 AM Bruno Baptista 
wrote:


Hi Ivan,

I've requested some changes.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/11/18 11:29, Bruno Baptista wrote:

Hi,

I can review it.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 18:27, Ivan Junckes Filho wrote:

Hey guys can anyone review and merge this?

https://github.com/apache/tomee/pull/218


On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez

wrote:


And it did cover. The test was failing.


On 23 Nov 2018, at 16:00, Romain Manni-Bucau 

wrote:

https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java

was supposed to cover that

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github <

https://github.com/rmannibucau> |

LinkedIn  | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance


Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a

écrit :

We should probably add a test for that regression.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 15:50, Ivan Junckes Filho wrote:

It worked, thanks man!

On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez


wrote:

Yes, that was the issue. This should fix it:



https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829

Try to pull the code and test it again.

Cheers,
Roberto

On 23 Nov 2018, at 14:14, Roberto Cortez 
wrote:

No point. I’ve found the issue:

It’s here:



https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37

This commit reverted back the new JsonbProvider to the old

JohnzonProvider.

The fix should be just to replace one with another. Let me try
it and

test.

Cheers,
Roberto

On 23 Nov 2018, at 12:06, Ivan Junckes Filho

wrote:

I was using the current master.

1.1.9

I will try to use the version Romain proposed and see how it

works.


On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
radcor...@yahoo.com.invalid> wrote:


Hey,

I think metrics doesn’t even run properly on TomEE 7.x because
of CDI

2.0.

Regarding the fail, I’m not sure what is wrong. I remember seeing

that

before and I think it got fixed when we added the JsonB JAX-RS

Provider.

Maybe there is a regression in some place.

Cheers,
Roberto


On 22 Nov 2018, at 21:08, Romain Manni-Bucau

wrote:

Hi Ivan

Do you use tomee 8 with johnzon 1.1.10? Works well on this one

normally

if johnzon defaults are not broken. On tomee 7 you need to add
jsonb

;)

Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a écrit :

Also there are a lot of properties being returned on that

payload

that

are not needed like rate1, rate5... etc.

On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

The issue with the TCK is because meter in the spec expects

fifteenMinRate instead of fifteenMinuteRate.

Same apply for the other properties like fiveMin..oneMin..

@JsonbProperty("fifteenMinRate") is probably being ignored.




On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

Hey Romain, it is actually a mapping issue. I created the PR
but the

microprofile metrics TCK seems to be broken on TomEE, so I am not

sure

if

the PR is reliable.

https://github.com/apache/geronimo-metrics/pull/2 <

https://github.com/apache/geronimo-metrics/pull/2>

I will try to check what is going on with the TCK on TomEE, if
you

have

any tips let me know.



On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <

rmannibu...@gmail.com > wrote:

Hi Ivan

It is a bug in tomee scanning I think


Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a

écrit :


Hey guys, I was writing an example of metrics gauge (WIP).

https://github.com/apache/tomee/pull/213 <

https://github.com/apache/tomee/pull/213>

And I found a bug when trying access a gauge with "Accept:
application/json".

Just to let you know that I will work on a fix for this:

21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]


org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare

Both


org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson


and


org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson

are equal candidates for handling the current request which can

lead

to

unpredictable results
21-Nov-2018 

Re: Metrics Gauge Example and Bug

2018-11-26 Thread Ivan Junckes Filho
Bruno, can you review again please?

On Mon, Nov 26, 2018 at 10:46 AM Ivan Junckes Filho 
wrote:

> Awesome, thanks Bruno
>
> On Mon, Nov 26, 2018 at 10:23 AM Bruno Baptista 
> wrote:
>
>> Hi Ivan,
>>
>> I've requested some changes.
>>
>> Cheers
>>
>> Bruno Baptista
>> https://twitter.com/brunobat_
>>
>>
>> On 26/11/18 11:29, Bruno Baptista wrote:
>> > Hi,
>> >
>> > I can review it.
>> >
>> > Bruno Baptista
>> > https://twitter.com/brunobat_
>> >
>> >
>> > On 23/11/18 18:27, Ivan Junckes Filho wrote:
>> >> Hey guys can anyone review and merge this?
>> >>
>> >> https://github.com/apache/tomee/pull/218
>> >>
>> >>
>> >> On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez
>> >> 
>> >> wrote:
>> >>
>> >>> And it did cover. The test was failing.
>> >>>
>>  On 23 Nov 2018, at 16:00, Romain Manni-Bucau 
>> >>> wrote:
>> 
>> >>>
>> https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
>> >>>
>>  was supposed to cover that
>> 
>>  Romain Manni-Bucau
>>  @rmannibucau  |  Blog
>>   | Old Blog
>>   | Github <
>> >>> https://github.com/rmannibucau> |
>>  LinkedIn  | Book
>>  <
>> >>>
>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>> >>>
>> 
>> 
>>  Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a
>> >>> écrit :
>> > We should probably add a test for that regression.
>> >
>> > Bruno Baptista
>> > https://twitter.com/brunobat_
>> >
>> >
>> > On 23/11/18 15:50, Ivan Junckes Filho wrote:
>> >> It worked, thanks man!
>> >>
>> >> On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez
>> >> 
>> > wrote:
>> >>> Yes, that was the issue. This should fix it:
>> >>>
>> >>>
>> >>>
>> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
>> >>>
>> >>> Try to pull the code and test it again.
>> >>>
>> >>> Cheers,
>> >>> Roberto
>> >>>
>> >>> On 23 Nov 2018, at 14:14, Roberto Cortez 
>> >>> wrote:
>> >>>
>> >>> No point. I’ve found the issue:
>> >>>
>> >>> It’s here:
>> >>>
>> >>>
>> >>>
>> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
>> >>>
>> >>> This commit reverted back the new JsonbProvider to the old
>> > JohnzonProvider.
>> >>> The fix should be just to replace one with another. Let me try
>> >>> it and
>> > test.
>> >>> Cheers,
>> >>> Roberto
>> >>>
>> >>> On 23 Nov 2018, at 12:06, Ivan Junckes Filho
>> >>> 
>> >>> wrote:
>> >>>
>> >>> I was using the current master.
>> >>>
>> >>> 1.1.9
>> >>>
>> >>> I will try to use the version Romain proposed and see how it
>> works.
>> >>>
>> >>>
>> >>> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
>> >>> radcor...@yahoo.com.invalid> wrote:
>> >>>
>>  Hey,
>> 
>>  I think metrics doesn’t even run properly on TomEE 7.x because
>>  of CDI
>> > 2.0.
>>  Regarding the fail, I’m not sure what is wrong. I remember seeing
>> >>> that
>>  before and I think it got fixed when we added the JsonB JAX-RS
>> > Provider.
>>  Maybe there is a regression in some place.
>> 
>>  Cheers,
>>  Roberto
>> 
>> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau
>> > >  wrote:
>> > Hi Ivan
>> >
>> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one
>> > normally
>>  if johnzon defaults are not broken. On tomee 7 you need to add
>>  jsonb
>> >>> ;)
>> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <
>> >>> ivanjunc...@gmail.com
>>  > a écrit :
>> > Also there are a lot of properties being returned on that
>> payload
>> >>> that
>>  are not needed like rate1, rate5... etc.
>> >
>> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
>>  ivanjunc...@gmail.com > wrote:
>> > The issue with the TCK is because meter in the spec expects
>>  fifteenMinRate instead of fifteenMinuteRate.
>> > Same apply for the other properties like fiveMin..oneMin..
>> >
>> > @JsonbProperty("fifteenMinRate") is probably being ignored.
>> >
>> >
>> >
>> >
>> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
>>  ivanjunc...@gmail.com > wrote:
>> > Hey Romain, it is actually a mapping issue. I created the PR
>> > but the
>>  microprofile metrics TCK seems to be broken on TomEE, so I am not
>> >>> sure
>> > if

Re: Metrics Gauge Example and Bug

2018-11-26 Thread Ivan Junckes Filho
Awesome, thanks Bruno

On Mon, Nov 26, 2018 at 10:23 AM Bruno Baptista  wrote:

> Hi Ivan,
>
> I've requested some changes.
>
> Cheers
>
> Bruno Baptista
> https://twitter.com/brunobat_
>
>
> On 26/11/18 11:29, Bruno Baptista wrote:
> > Hi,
> >
> > I can review it.
> >
> > Bruno Baptista
> > https://twitter.com/brunobat_
> >
> >
> > On 23/11/18 18:27, Ivan Junckes Filho wrote:
> >> Hey guys can anyone review and merge this?
> >>
> >> https://github.com/apache/tomee/pull/218
> >>
> >>
> >> On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez
> >> 
> >> wrote:
> >>
> >>> And it did cover. The test was failing.
> >>>
>  On 23 Nov 2018, at 16:00, Romain Manni-Bucau 
> >>> wrote:
> 
> >>>
> https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
> >>>
>  was supposed to cover that
> 
>  Romain Manni-Bucau
>  @rmannibucau  |  Blog
>   | Old Blog
>   | Github <
> >>> https://github.com/rmannibucau> |
>  LinkedIn  | Book
>  <
> >>>
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >>>
> 
> 
>  Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a
> >>> écrit :
> > We should probably add a test for that regression.
> >
> > Bruno Baptista
> > https://twitter.com/brunobat_
> >
> >
> > On 23/11/18 15:50, Ivan Junckes Filho wrote:
> >> It worked, thanks man!
> >>
> >> On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez
> >> 
> > wrote:
> >>> Yes, that was the issue. This should fix it:
> >>>
> >>>
> >>>
> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
> >>>
> >>> Try to pull the code and test it again.
> >>>
> >>> Cheers,
> >>> Roberto
> >>>
> >>> On 23 Nov 2018, at 14:14, Roberto Cortez 
> >>> wrote:
> >>>
> >>> No point. I’ve found the issue:
> >>>
> >>> It’s here:
> >>>
> >>>
> >>>
> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
> >>>
> >>> This commit reverted back the new JsonbProvider to the old
> > JohnzonProvider.
> >>> The fix should be just to replace one with another. Let me try
> >>> it and
> > test.
> >>> Cheers,
> >>> Roberto
> >>>
> >>> On 23 Nov 2018, at 12:06, Ivan Junckes Filho
> >>> 
> >>> wrote:
> >>>
> >>> I was using the current master.
> >>>
> >>> 1.1.9
> >>>
> >>> I will try to use the version Romain proposed and see how it works.
> >>>
> >>>
> >>> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
> >>> radcor...@yahoo.com.invalid> wrote:
> >>>
>  Hey,
> 
>  I think metrics doesn’t even run properly on TomEE 7.x because
>  of CDI
> > 2.0.
>  Regarding the fail, I’m not sure what is wrong. I remember seeing
> >>> that
>  before and I think it got fixed when we added the JsonB JAX-RS
> > Provider.
>  Maybe there is a regression in some place.
> 
>  Cheers,
>  Roberto
> 
> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau
> >   wrote:
> > Hi Ivan
> >
> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one
> > normally
>  if johnzon defaults are not broken. On tomee 7 you need to add
>  jsonb
> >>> ;)
> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <
> >>> ivanjunc...@gmail.com
>  > a écrit :
> > Also there are a lot of properties being returned on that payload
> >>> that
>  are not needed like rate1, rate5... etc.
> >
> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
>  ivanjunc...@gmail.com > wrote:
> > The issue with the TCK is because meter in the spec expects
>  fifteenMinRate instead of fifteenMinuteRate.
> > Same apply for the other properties like fiveMin..oneMin..
> >
> > @JsonbProperty("fifteenMinRate") is probably being ignored.
> >
> >
> >
> >
> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
>  ivanjunc...@gmail.com > wrote:
> > Hey Romain, it is actually a mapping issue. I created the PR
> > but the
>  microprofile metrics TCK seems to be broken on TomEE, so I am not
> >>> sure
> > if
>  the PR is reliable.
> > https://github.com/apache/geronimo-metrics/pull/2 <
>  https://github.com/apache/geronimo-metrics/pull/2>
> > I will try to check what is going on with the TCK on TomEE, if
> > you
> > have
> 

Re: Metrics Gauge Example and Bug

2018-11-26 Thread Bruno Baptista

Hi Ivan,

I've requested some changes.

Cheers

Bruno Baptista
https://twitter.com/brunobat_


On 26/11/18 11:29, Bruno Baptista wrote:

Hi,

I can review it.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 18:27, Ivan Junckes Filho wrote:

Hey guys can anyone review and merge this?

https://github.com/apache/tomee/pull/218


On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez 


wrote:


And it did cover. The test was failing.


On 23 Nov 2018, at 16:00, Romain Manni-Bucau 

wrote:


https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java 


was supposed to cover that

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github <

https://github.com/rmannibucau> |

LinkedIn  | Book
<
https://www.packtpub.com/application-development/java-ee-8-high-performance 




Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a

écrit :

We should probably add a test for that regression.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 15:50, Ivan Junckes Filho wrote:

It worked, thanks man!

On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez 


wrote:

Yes, that was the issue. This should fix it:


https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829 


Try to pull the code and test it again.

Cheers,
Roberto

On 23 Nov 2018, at 14:14, Roberto Cortez  
wrote:


No point. I’ve found the issue:

It’s here:


https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37 


This commit reverted back the new JsonbProvider to the old

JohnzonProvider.
The fix should be just to replace one with another. Let me try 
it and

test.

Cheers,
Roberto

On 23 Nov 2018, at 12:06, Ivan Junckes Filho 


wrote:

I was using the current master.

1.1.9

I will try to use the version Romain proposed and see how it works.


On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
radcor...@yahoo.com.invalid> wrote:


Hey,

I think metrics doesn’t even run properly on TomEE 7.x because 
of CDI

2.0.

Regarding the fail, I’m not sure what is wrong. I remember seeing

that

before and I think it got fixed when we added the JsonB JAX-RS

Provider.

Maybe there is a regression in some place.

Cheers,
Roberto

On 22 Nov 2018, at 21:08, Romain Manni-Bucau 

wrote:

Hi Ivan

Do you use tomee 8 with johnzon 1.1.10? Works well on this one

normally
if johnzon defaults are not broken. On tomee 7 you need to add 
jsonb

;)

Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a écrit :

Also there are a lot of properties being returned on that payload

that

are not needed like rate1, rate5... etc.


On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

The issue with the TCK is because meter in the spec expects

fifteenMinRate instead of fifteenMinuteRate.

Same apply for the other properties like fiveMin..oneMin..

@JsonbProperty("fifteenMinRate") is probably being ignored.




On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:
Hey Romain, it is actually a mapping issue. I created the PR 
but the

microprofile metrics TCK seems to be broken on TomEE, so I am not

sure

if

the PR is reliable.

https://github.com/apache/geronimo-metrics/pull/2 <

https://github.com/apache/geronimo-metrics/pull/2>
I will try to check what is going on with the TCK on TomEE, if 
you

have

any tips let me know.




On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <

rmannibu...@gmail.com > wrote:

Hi Ivan

It is a bug in tomee scanning I think


Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a

écrit :


Hey guys, I was writing an example of metrics gauge (WIP).

https://github.com/apache/tomee/pull/213 <

https://github.com/apache/tomee/pull/213>

And I found a bug when trying access a gauge with "Accept:
application/json".

Just to let you know that I will work on a fix for this:

21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare 


Both

org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson 


and

org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson 


are equal candidates for handling the current request which can

lead

to

unpredictable results
21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem

Problem with

writing the data, class java.util.Collections$SingletonMap,

ContentType:

application/json
21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]

Re: Metrics Gauge Example and Bug

2018-11-26 Thread Bruno Baptista

Hi,

I can review it.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 18:27, Ivan Junckes Filho wrote:

Hey guys can anyone review and merge this?

https://github.com/apache/tomee/pull/218


On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez 
wrote:


And it did cover. The test was failing.


On 23 Nov 2018, at 16:00, Romain Manni-Bucau 

wrote:



https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java

was supposed to cover that

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github <

https://github.com/rmannibucau> |

LinkedIn  | Book
<

https://www.packtpub.com/application-development/java-ee-8-high-performance



Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a

écrit :

We should probably add a test for that regression.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 15:50, Ivan Junckes Filho wrote:

It worked, thanks man!

On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez 

wrote:

Yes, that was the issue. This should fix it:



https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829

Try to pull the code and test it again.

Cheers,
Roberto

On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:

No point. I’ve found the issue:

It’s here:



https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37

This commit reverted back the new JsonbProvider to the old

JohnzonProvider.

The fix should be just to replace one with another. Let me try it and

test.

Cheers,
Roberto

On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
wrote:

I was using the current master.

1.1.9

I will try to use the version Romain proposed and see how it works.


On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
radcor...@yahoo.com.invalid> wrote:


Hey,

I think metrics doesn’t even run properly on TomEE 7.x because of CDI

2.0.

Regarding the fail, I’m not sure what is wrong. I remember seeing

that

before and I think it got fixed when we added the JsonB JAX-RS

Provider.

Maybe there is a regression in some place.

Cheers,
Roberto


On 22 Nov 2018, at 21:08, Romain Manni-Bucau 
wrote:

Hi Ivan

Do you use tomee 8 with johnzon 1.1.10? Works well on this one

normally

if johnzon defaults are not broken. On tomee 7 you need to add jsonb

;)

Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a écrit :

Also there are a lot of properties being returned on that payload

that

are not needed like rate1, rate5... etc.


On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

The issue with the TCK is because meter in the spec expects

fifteenMinRate instead of fifteenMinuteRate.

Same apply for the other properties like fiveMin..oneMin..

@JsonbProperty("fifteenMinRate") is probably being ignored.




On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

Hey Romain, it is actually a mapping issue. I created the PR but the

microprofile metrics TCK seems to be broken on TomEE, so I am not

sure

if

the PR is reliable.

https://github.com/apache/geronimo-metrics/pull/2 <

https://github.com/apache/geronimo-metrics/pull/2>

I will try to check what is going on with the TCK on TomEE, if you

have

any tips let me know.




On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <

rmannibu...@gmail.com > wrote:

Hi Ivan

It is a bug in tomee scanning I think


Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho <

ivanjunc...@gmail.com

> a

écrit :


Hey guys, I was writing an example of metrics gauge (WIP).

https://github.com/apache/tomee/pull/213 <

https://github.com/apache/tomee/pull/213>

And I found a bug when trying access a gauge with "Accept:
application/json".

Just to let you know that I will work on a fix for this:

21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare

Both


org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson

and


org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson

are equal candidates for handling the current request which can

lead

to

unpredictable results
21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem

Problem with

writing the data, class java.util.Collections$SingletonMap,

ContentType:

application/json
21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging

Interceptor for

{


http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints

  <



Re: Metrics Gauge Example and Bug

2018-11-23 Thread Ivan Junckes Filho
Hey guys can anyone review and merge this?

https://github.com/apache/tomee/pull/218


On Fri, Nov 23, 2018 at 2:22 PM Roberto Cortez 
wrote:

> And it did cover. The test was failing.
>
> > On 23 Nov 2018, at 16:00, Romain Manni-Bucau 
> wrote:
> >
> >
> https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
> > was supposed to cover that
> >
> > Romain Manni-Bucau
> > @rmannibucau  |  Blog
> >  | Old Blog
> >  | Github <
> https://github.com/rmannibucau> |
> > LinkedIn  | Book
> > <
> https://www.packtpub.com/application-development/java-ee-8-high-performance
> >
> >
> >
> > Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a
> écrit :
> >
> >> We should probably add a test for that regression.
> >>
> >> Bruno Baptista
> >> https://twitter.com/brunobat_
> >>
> >>
> >> On 23/11/18 15:50, Ivan Junckes Filho wrote:
> >>> It worked, thanks man!
> >>>
> >>> On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez 
> >> wrote:
> >>>
>  Yes, that was the issue. This should fix it:
> 
> 
> >>
> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
> 
>  Try to pull the code and test it again.
> 
>  Cheers,
>  Roberto
> 
>  On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:
> 
>  No point. I’ve found the issue:
> 
>  It’s here:
> 
> 
> >>
> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
> 
>  This commit reverted back the new JsonbProvider to the old
> >> JohnzonProvider.
> 
>  The fix should be just to replace one with another. Let me try it and
> >> test.
> 
>  Cheers,
>  Roberto
> 
>  On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
>  wrote:
> 
>  I was using the current master.
> 
>  1.1.9
> 
>  I will try to use the version Romain proposed and see how it works.
> 
> 
>  On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
>  radcor...@yahoo.com.invalid> wrote:
> 
> > Hey,
> >
> > I think metrics doesn’t even run properly on TomEE 7.x because of CDI
> >> 2.0.
> >
> > Regarding the fail, I’m not sure what is wrong. I remember seeing
> that
> > before and I think it got fixed when we added the JsonB JAX-RS
> >> Provider.
> > Maybe there is a regression in some place.
> >
> > Cheers,
> > Roberto
> >
> >> On 22 Nov 2018, at 21:08, Romain Manni-Bucau  >
> > wrote:
> >> Hi Ivan
> >>
> >> Do you use tomee 8 with johnzon 1.1.10? Works well on this one
> >> normally
> > if johnzon defaults are not broken. On tomee 7 you need to add jsonb
> ;)
> >> Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho <
> ivanjunc...@gmail.com
> > > a écrit :
> >> Also there are a lot of properties being returned on that payload
> that
> > are not needed like rate1, rate5... etc.
> >>
> >>
> >> On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
> > ivanjunc...@gmail.com > wrote:
> >> The issue with the TCK is because meter in the spec expects
> > fifteenMinRate instead of fifteenMinuteRate.
> >> Same apply for the other properties like fiveMin..oneMin..
> >>
> >> @JsonbProperty("fifteenMinRate") is probably being ignored.
> >>
> >>
> >>
> >>
> >> On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
> > ivanjunc...@gmail.com > wrote:
> >> Hey Romain, it is actually a mapping issue. I created the PR but the
> > microprofile metrics TCK seems to be broken on TomEE, so I am not
> sure
> >> if
> > the PR is reliable.
> >> https://github.com/apache/geronimo-metrics/pull/2 <
> > https://github.com/apache/geronimo-metrics/pull/2>
> >> I will try to check what is going on with the TCK on TomEE, if you
> >> have
> > any tips let me know.
> >>
> >>
> >>
> >>
> >> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
> > rmannibu...@gmail.com > wrote:
> >> Hi Ivan
> >>
> >> It is a bug in tomee scanning I think
> >>
> >>
> >> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho <
> ivanjunc...@gmail.com
> > > a
> >> écrit :
> >>
> >>> Hey guys, I was writing an example of metrics gauge (WIP).
> >>>
> >>> https://github.com/apache/tomee/pull/213 <
> > https://github.com/apache/tomee/pull/213>
> >>> And I found a bug when trying access a gauge with "Accept:
> >>> application/json".
> >>>
> >>> Just to let you know that I will work on a fix for this:
> >>>
> >>> 21-Nov-2018 17:24:08.811 WARNING 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Roberto Cortez
And it did cover. The test was failing. 

> On 23 Nov 2018, at 16:00, Romain Manni-Bucau  wrote:
> 
> https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
> was supposed to cover that
> 
> Romain Manni-Bucau
> @rmannibucau  |  Blog
>  | Old Blog
>  | Github  |
> LinkedIn  | Book
> 
> 
> 
> Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a écrit :
> 
>> We should probably add a test for that regression.
>> 
>> Bruno Baptista
>> https://twitter.com/brunobat_
>> 
>> 
>> On 23/11/18 15:50, Ivan Junckes Filho wrote:
>>> It worked, thanks man!
>>> 
>>> On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez 
>> wrote:
>>> 
 Yes, that was the issue. This should fix it:
 
 
>> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
 
 Try to pull the code and test it again.
 
 Cheers,
 Roberto
 
 On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:
 
 No point. I’ve found the issue:
 
 It’s here:
 
 
>> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
 
 This commit reverted back the new JsonbProvider to the old
>> JohnzonProvider.
 
 The fix should be just to replace one with another. Let me try it and
>> test.
 
 Cheers,
 Roberto
 
 On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
 wrote:
 
 I was using the current master.
 
 1.1.9
 
 I will try to use the version Romain proposed and see how it works.
 
 
 On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
 radcor...@yahoo.com.invalid> wrote:
 
> Hey,
> 
> I think metrics doesn’t even run properly on TomEE 7.x because of CDI
>> 2.0.
> 
> Regarding the fail, I’m not sure what is wrong. I remember seeing that
> before and I think it got fixed when we added the JsonB JAX-RS
>> Provider.
> Maybe there is a regression in some place.
> 
> Cheers,
> Roberto
> 
>> On 22 Nov 2018, at 21:08, Romain Manni-Bucau 
> wrote:
>> Hi Ivan
>> 
>> Do you use tomee 8 with johnzon 1.1.10? Works well on this one
>> normally
> if johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
>> Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  > a écrit :
>> Also there are a lot of properties being returned on that payload that
> are not needed like rate1, rate5... etc.
>> 
>> 
>> On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com > wrote:
>> The issue with the TCK is because meter in the spec expects
> fifteenMinRate instead of fifteenMinuteRate.
>> Same apply for the other properties like fiveMin..oneMin..
>> 
>> @JsonbProperty("fifteenMinRate") is probably being ignored.
>> 
>> 
>> 
>> 
>> On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com > wrote:
>> Hey Romain, it is actually a mapping issue. I created the PR but the
> microprofile metrics TCK seems to be broken on TomEE, so I am not sure
>> if
> the PR is reliable.
>> https://github.com/apache/geronimo-metrics/pull/2 <
> https://github.com/apache/geronimo-metrics/pull/2>
>> I will try to check what is going on with the TCK on TomEE, if you
>> have
> any tips let me know.
>> 
>> 
>> 
>> 
>> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
> rmannibu...@gmail.com > wrote:
>> Hi Ivan
>> 
>> It is a bug in tomee scanning I think
>> 
>> 
>> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  > a
>> écrit :
>> 
>>> Hey guys, I was writing an example of metrics gauge (WIP).
>>> 
>>> https://github.com/apache/tomee/pull/213 <
> https://github.com/apache/tomee/pull/213>
>>> And I found a bug when trying access a gauge with "Accept:
>>> application/json".
>>> 
>>> Just to let you know that I will work on a fix for this:
>>> 
>>> 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
>>> org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare
> Both
> 
>> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
>>> and
>>> 
> 
>> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
>>> are equal candidates for handling the current request which can lead
> to
>>> unpredictable results
>>> 21-Nov-2018 17:26:52.183 SEVERE 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Romain Manni-Bucau
https://github.com/apache/tomee/blob/4c7fd4af95983a92bef89dc598873310dd13dd2e/server/openejb-cxf-rs/src/test/java/org/apache/openejb/server/cxf/rs/johnzon/JsonbJaxrsProviderTest.java
was supposed to cover that

Romain Manni-Bucau
@rmannibucau  |  Blog
 | Old Blog
 | Github  |
LinkedIn  | Book



Le ven. 23 nov. 2018 à 16:58, Bruno Baptista  a écrit :

> We should probably add a test for that regression.
>
> Bruno Baptista
> https://twitter.com/brunobat_
>
>
> On 23/11/18 15:50, Ivan Junckes Filho wrote:
> > It worked, thanks man!
> >
> > On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez 
> wrote:
> >
> >> Yes, that was the issue. This should fix it:
> >>
> >>
> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
> >>
> >> Try to pull the code and test it again.
> >>
> >> Cheers,
> >> Roberto
> >>
> >> On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:
> >>
> >> No point. I’ve found the issue:
> >>
> >> It’s here:
> >>
> >>
> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
> >>
> >> This commit reverted back the new JsonbProvider to the old
> JohnzonProvider.
> >>
> >> The fix should be just to replace one with another. Let me try it and
> test.
> >>
> >> Cheers,
> >> Roberto
> >>
> >> On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
> >> wrote:
> >>
> >> I was using the current master.
> >>
> >> 1.1.9
> >>
> >> I will try to use the version Romain proposed and see how it works.
> >>
> >>
> >> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
> >> radcor...@yahoo.com.invalid> wrote:
> >>
> >>> Hey,
> >>>
> >>> I think metrics doesn’t even run properly on TomEE 7.x because of CDI
> 2.0.
> >>>
> >>> Regarding the fail, I’m not sure what is wrong. I remember seeing that
> >>> before and I think it got fixed when we added the JsonB JAX-RS
> Provider.
> >>> Maybe there is a regression in some place.
> >>>
> >>> Cheers,
> >>> Roberto
> >>>
>  On 22 Nov 2018, at 21:08, Romain Manni-Bucau 
> >>> wrote:
>  Hi Ivan
> 
>  Do you use tomee 8 with johnzon 1.1.10? Works well on this one
> normally
> >>> if johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
>  Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  >>> > a écrit :
>  Also there are a lot of properties being returned on that payload that
> >>> are not needed like rate1, rate5... etc.
> 
> 
>  On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
> >>> ivanjunc...@gmail.com > wrote:
>  The issue with the TCK is because meter in the spec expects
> >>> fifteenMinRate instead of fifteenMinuteRate.
>  Same apply for the other properties like fiveMin..oneMin..
> 
>  @JsonbProperty("fifteenMinRate") is probably being ignored.
> 
> 
> 
> 
>  On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
> >>> ivanjunc...@gmail.com > wrote:
>  Hey Romain, it is actually a mapping issue. I created the PR but the
> >>> microprofile metrics TCK seems to be broken on TomEE, so I am not sure
> if
> >>> the PR is reliable.
>  https://github.com/apache/geronimo-metrics/pull/2 <
> >>> https://github.com/apache/geronimo-metrics/pull/2>
>  I will try to check what is going on with the TCK on TomEE, if you
> have
> >>> any tips let me know.
> 
> 
> 
> 
>  On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
> >>> rmannibu...@gmail.com > wrote:
>  Hi Ivan
> 
>  It is a bug in tomee scanning I think
> 
> 
>  Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  >>> > a
>  écrit :
> 
> > Hey guys, I was writing an example of metrics gauge (WIP).
> >
> > https://github.com/apache/tomee/pull/213 <
> >>> https://github.com/apache/tomee/pull/213>
> > And I found a bug when trying access a gauge with "Accept:
> > application/json".
> >
> > Just to let you know that I will work on a fix for this:
> >
> > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare
> >>> Both
> >>>
> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> > and
> >
> >>>
> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> > are equal candidates for handling the current request which can lead
> >>> to
> > unpredictable results
> > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem
> >>> Problem with
> > writing the data, class java.util.Collections$SingletonMap,
> >>> 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Bruno Baptista

We should probably add a test for that regression.

Bruno Baptista
https://twitter.com/brunobat_


On 23/11/18 15:50, Ivan Junckes Filho wrote:

It worked, thanks man!

On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez  wrote:


Yes, that was the issue. This should fix it:

https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829

Try to pull the code and test it again.

Cheers,
Roberto

On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:

No point. I’ve found the issue:

It’s here:

https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37

This commit reverted back the new JsonbProvider to the old JohnzonProvider.

The fix should be just to replace one with another. Let me try it and test.

Cheers,
Roberto

On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
wrote:

I was using the current master.

1.1.9

I will try to use the version Romain proposed and see how it works.


On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
radcor...@yahoo.com.invalid> wrote:


Hey,

I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.

Regarding the fail, I’m not sure what is wrong. I remember seeing that
before and I think it got fixed when we added the JsonB JAX-RS Provider.
Maybe there is a regression in some place.

Cheers,
Roberto


On 22 Nov 2018, at 21:08, Romain Manni-Bucau 

wrote:

Hi Ivan

Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally

if johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)

Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho 
> a écrit :

Also there are a lot of properties being returned on that payload that

are not needed like rate1, rate5... etc.



On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

The issue with the TCK is because meter in the spec expects

fifteenMinRate instead of fifteenMinuteRate.

Same apply for the other properties like fiveMin..oneMin..

@JsonbProperty("fifteenMinRate") is probably being ignored.




On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <

ivanjunc...@gmail.com > wrote:

Hey Romain, it is actually a mapping issue. I created the PR but the

microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
the PR is reliable.

https://github.com/apache/geronimo-metrics/pull/2 <

https://github.com/apache/geronimo-metrics/pull/2>

I will try to check what is going on with the TCK on TomEE, if you have

any tips let me know.





On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <

rmannibu...@gmail.com > wrote:

Hi Ivan

It is a bug in tomee scanning I think


Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho 
> a

écrit :


Hey guys, I was writing an example of metrics gauge (WIP).

https://github.com/apache/tomee/pull/213 <

https://github.com/apache/tomee/pull/213>

And I found a bug when trying access a gauge with "Accept:
application/json".

Just to let you know that I will work on a fix for this:

21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare

Both
org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson

and


org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson

are equal candidates for handling the current request which can lead

to

unpredictable results
21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem

Problem with

writing the data, class java.util.Collections$SingletonMap,

ContentType:

application/json
21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging

Interceptor for

{


http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
  <
http://jaxrs.common.metrics.microprofile.geronimo.apache.org/%7DMetricsEndpoints

has thrown exception, unwinding now
  org.apache.cxf.interceptor.Fault
at


org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)

at


org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)

at


org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)

at


org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)

at


org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)

at


org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)

at


org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)

at


org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)

at


org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)

at


Re: Metrics Gauge Example and Bug

2018-11-23 Thread Ivan Junckes Filho
It worked, thanks man!

On Fri, Nov 23, 2018 at 12:40 PM Roberto Cortez  wrote:

> Yes, that was the issue. This should fix it:
>
> https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829
>
> Try to pull the code and test it again.
>
> Cheers,
> Roberto
>
> On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:
>
> No point. I’ve found the issue:
>
> It’s here:
>
> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
>
> This commit reverted back the new JsonbProvider to the old JohnzonProvider.
>
> The fix should be just to replace one with another. Let me try it and test.
>
> Cheers,
> Roberto
>
> On 23 Nov 2018, at 12:06, Ivan Junckes Filho 
> wrote:
>
> I was using the current master.
>
> 1.1.9
>
> I will try to use the version Romain proposed and see how it works.
>
>
> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez <
> radcor...@yahoo.com.invalid> wrote:
>
>> Hey,
>>
>> I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.
>>
>> Regarding the fail, I’m not sure what is wrong. I remember seeing that
>> before and I think it got fixed when we added the JsonB JAX-RS Provider.
>> Maybe there is a regression in some place.
>>
>> Cheers,
>> Roberto
>>
>> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau 
>> wrote:
>> >
>> > Hi Ivan
>> >
>> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally
>> if johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
>> >
>> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho > > a écrit :
>> > Also there are a lot of properties being returned on that payload that
>> are not needed like rate1, rate5... etc.
>> >
>> >
>> >
>> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
>> ivanjunc...@gmail.com > wrote:
>> > The issue with the TCK is because meter in the spec expects
>> fifteenMinRate instead of fifteenMinuteRate.
>> >
>> > Same apply for the other properties like fiveMin..oneMin..
>> >
>> > @JsonbProperty("fifteenMinRate") is probably being ignored.
>> >
>> >
>> >
>> >
>> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
>> ivanjunc...@gmail.com > wrote:
>> > Hey Romain, it is actually a mapping issue. I created the PR but the
>> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
>> the PR is reliable.
>> > https://github.com/apache/geronimo-metrics/pull/2 <
>> https://github.com/apache/geronimo-metrics/pull/2>
>> >
>> > I will try to check what is going on with the TCK on TomEE, if you have
>> any tips let me know.
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
>> rmannibu...@gmail.com > wrote:
>> > Hi Ivan
>> >
>> > It is a bug in tomee scanning I think
>> >
>> >
>> > Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho > > a
>> > écrit :
>> >
>> > > Hey guys, I was writing an example of metrics gauge (WIP).
>> > >
>> > > https://github.com/apache/tomee/pull/213 <
>> https://github.com/apache/tomee/pull/213>
>> > >
>> > > And I found a bug when trying access a gauge with "Accept:
>> > > application/json".
>> > >
>> > > Just to let you know that I will work on a fix for this:
>> > >
>> > > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
>> > > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare
>> Both
>> > >
>> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
>> > > and
>> > >
>> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
>> > > are equal candidates for handling the current request which can lead
>> to
>> > > unpredictable results
>> > > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
>> > > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem
>> Problem with
>> > > writing the data, class java.util.Collections$SingletonMap,
>> ContentType:
>> > > application/json
>> > > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
>> > > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging
>> Interceptor for
>> > > {
>> > >
>> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
>>  <
>> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/%7DMetricsEndpoints
>> >
>> > > has thrown exception, unwinding now
>> > >  org.apache.cxf.interceptor.Fault
>> > > at
>> > >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
>> > > at
>> > >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
>> > > at
>> > >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
>> > > at
>> > >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
>> > > at
>> > >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>> 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Roberto Cortez
Yes, that was the issue. This should fix it:
https://github.com/apache/tomee/commit/1bfb65a1837235f4e9ad4458f67aabcab5eff829 


Try to pull the code and test it again.

Cheers,
Roberto

> On 23 Nov 2018, at 14:14, Roberto Cortez  wrote:
> 
> No point. I’ve found the issue:
> 
> It’s here:
> https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
>  
> 
> 
> This commit reverted back the new JsonbProvider to the old JohnzonProvider.
> 
> The fix should be just to replace one with another. Let me try it and test.
> 
> Cheers,
> Roberto
> 
>> On 23 Nov 2018, at 12:06, Ivan Junckes Filho > > wrote:
>> 
>> I was using the current master.
>> 1.1.9
>> I will try to use the version Romain proposed and see how it works.
>> 
>> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez > > wrote:
>> Hey,
>> 
>> I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.
>> 
>> Regarding the fail, I’m not sure what is wrong. I remember seeing that 
>> before and I think it got fixed when we added the JsonB JAX-RS Provider. 
>> Maybe there is a regression in some place.
>> 
>> Cheers,
>> Roberto
>> 
>> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau > > > wrote:
>> > 
>> > Hi Ivan
>> > 
>> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally if 
>> > johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
>> > 
>> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho > >  > > >> a écrit :
>> > Also there are a lot of properties being returned on that payload that are 
>> > not needed like rate1, rate5... etc.
>> > 
>> > 
>> > 
>> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho > >  > > >> wrote:
>> > The issue with the TCK is because meter in the spec expects fifteenMinRate 
>> > instead of fifteenMinuteRate.
>> > 
>> > Same apply for the other properties like fiveMin..oneMin..
>> > 
>> > @JsonbProperty("fifteenMinRate") is probably being ignored.
>> > 
>> > 
>> > 
>> > 
>> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho > >  > > >> wrote:
>> > Hey Romain, it is actually a mapping issue. I created the PR but the 
>> > microprofile metrics TCK seems to be broken on TomEE, so I am not sure if 
>> > the PR is reliable.
>> > https://github.com/apache/geronimo-metrics/pull/2 
>> >  
>> > > > >
>> > 
>> > I will try to check what is going on with the TCK on TomEE, if you have 
>> > any tips let me know.
>> > 
>> > 
>> > 
>> > 
>> > 
>> > On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau > >  > > >> wrote:
>> > Hi Ivan
>> > 
>> > It is a bug in tomee scanning I think
>> > 
>> > 
>> > Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho > >  > > >> a
>> > écrit :
>> > 
>> > > Hey guys, I was writing an example of metrics gauge (WIP).
>> > >
>> > > https://github.com/apache/tomee/pull/213 
>> > >  
>> > > > > > >
>> > >
>> > > And I found a bug when trying access a gauge with "Accept:
>> > > application/json".
>> > >
>> > > Just to let you know that I will work on a fix for this:
>> > >
>> > > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
>> > > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
>> > > org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
>> > > and
>> > > org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
>> > > are equal candidates for handling the current request which can lead to
>> > > unpredictable results
>> > > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
>> > > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem 
>> > > with
>> > > writing the data, class java.util.Collections$SingletonMap, ContentType:
>> > > application/json
>> > > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
>> > > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor 
>> > > for
>> > > {
>> > > http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
>> > >  
>> > > 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Roberto Cortez
No point. I’ve found the issue:

It’s here:
https://github.com/tomitribe/tomee/commit/7f18f4bcfe64119b9001d5ac6bffeb7324987a37
 


This commit reverted back the new JsonbProvider to the old JohnzonProvider.

The fix should be just to replace one with another. Let me try it and test.

Cheers,
Roberto

> On 23 Nov 2018, at 12:06, Ivan Junckes Filho  wrote:
> 
> I was using the current master.
> 1.1.9
> I will try to use the version Romain proposed and see how it works.
> 
> On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez  > wrote:
> Hey,
> 
> I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.
> 
> Regarding the fail, I’m not sure what is wrong. I remember seeing that before 
> and I think it got fixed when we added the JsonB JAX-RS Provider. Maybe there 
> is a regression in some place.
> 
> Cheers,
> Roberto
> 
> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau  > > wrote:
> > 
> > Hi Ivan
> > 
> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally if 
> > johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
> > 
> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  >   > >> a écrit :
> > Also there are a lot of properties being returned on that payload that are 
> > not needed like rate1, rate5... etc.
> > 
> > 
> > 
> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho  >   > >> wrote:
> > The issue with the TCK is because meter in the spec expects fifteenMinRate 
> > instead of fifteenMinuteRate.
> > 
> > Same apply for the other properties like fiveMin..oneMin..
> > 
> > @JsonbProperty("fifteenMinRate") is probably being ignored.
> > 
> > 
> > 
> > 
> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho  >   > >> wrote:
> > Hey Romain, it is actually a mapping issue. I created the PR but the 
> > microprofile metrics TCK seems to be broken on TomEE, so I am not sure if 
> > the PR is reliable.
> > https://github.com/apache/geronimo-metrics/pull/2 
> >  
> >  > >
> > 
> > I will try to check what is going on with the TCK on TomEE, if you have any 
> > tips let me know.
> > 
> > 
> > 
> > 
> > 
> > On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau  >   > >> wrote:
> > Hi Ivan
> > 
> > It is a bug in tomee scanning I think
> > 
> > 
> > Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  >   > >> a
> > écrit :
> > 
> > > Hey guys, I was writing an example of metrics gauge (WIP).
> > >
> > > https://github.com/apache/tomee/pull/213 
> > >  
> > >  > > >
> > >
> > > And I found a bug when trying access a gauge with "Accept:
> > > application/json".
> > >
> > > Just to let you know that I will work on a fix for this:
> > >
> > > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> > > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
> > > org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> > > and
> > > org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> > > are equal candidates for handling the current request which can lead to
> > > unpredictable results
> > > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> > > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem 
> > > with
> > > writing the data, class java.util.Collections$SingletonMap, ContentType:
> > > application/json
> > > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
> > > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor 
> > > for
> > > {
> > > http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
> > >  
> > > 
> > >  
> > >  > >  
> > > >
> > > has thrown exception, unwinding now
> > >  org.apache.cxf.interceptor.Fault
> > > at
> > > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
> > > at
> > > 

Re: Metrics Gauge Example and Bug

2018-11-23 Thread Ivan Junckes Filho
I was using the current master.

1.1.9

I will try to use the version Romain proposed and see how it works.


On Thu, Nov 22, 2018 at 7:36 PM Roberto Cortez 
wrote:

> Hey,
>
> I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.
>
> Regarding the fail, I’m not sure what is wrong. I remember seeing that
> before and I think it got fixed when we added the JsonB JAX-RS Provider.
> Maybe there is a regression in some place.
>
> Cheers,
> Roberto
>
> > On 22 Nov 2018, at 21:08, Romain Manni-Bucau 
> wrote:
> >
> > Hi Ivan
> >
> > Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally
> if johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
> >
> > Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  > a écrit :
> > Also there are a lot of properties being returned on that payload that
> are not needed like rate1, rate5... etc.
> >
> >
> >
> > On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com > wrote:
> > The issue with the TCK is because meter in the spec expects
> fifteenMinRate instead of fifteenMinuteRate.
> >
> > Same apply for the other properties like fiveMin..oneMin..
> >
> > @JsonbProperty("fifteenMinRate") is probably being ignored.
> >
> >
> >
> >
> > On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho <
> ivanjunc...@gmail.com > wrote:
> > Hey Romain, it is actually a mapping issue. I created the PR but the
> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
> the PR is reliable.
> > https://github.com/apache/geronimo-metrics/pull/2 <
> https://github.com/apache/geronimo-metrics/pull/2>
> >
> > I will try to check what is going on with the TCK on TomEE, if you have
> any tips let me know.
> >
> >
> >
> >
> >
> > On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
> rmannibu...@gmail.com > wrote:
> > Hi Ivan
> >
> > It is a bug in tomee scanning I think
> >
> >
> > Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  > a
> > écrit :
> >
> > > Hey guys, I was writing an example of metrics gauge (WIP).
> > >
> > > https://github.com/apache/tomee/pull/213 <
> https://github.com/apache/tomee/pull/213>
> > >
> > > And I found a bug when trying access a gauge with "Accept:
> > > application/json".
> > >
> > > Just to let you know that I will work on a fix for this:
> > >
> > > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> > > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
> > >
> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> > > and
> > >
> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> > > are equal candidates for handling the current request which can lead to
> > > unpredictable results
> > > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> > > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem
> with
> > > writing the data, class java.util.Collections$SingletonMap,
> ContentType:
> > > application/json
> > > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
> > > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging
> Interceptor for
> > > {
> > >
> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
> <
> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/%7DMetricsEndpoints
> >
> > > has thrown exception, unwinding now
> > >  org.apache.cxf.interceptor.Fault
> > > at
> > >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
> > > at
> > >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
> > > at
> > >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
> > > at
> > >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
> > > at
> > >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > > at
> > >
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
> > > at
> > >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > > at
> > >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> > > at
> > >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> > > at
> > >
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
> > > at
> > >
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > > at
> > >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > > at
> 

Re: Metrics Gauge Example and Bug

2018-11-22 Thread Roberto Cortez
Hey,

I think metrics doesn’t even run properly on TomEE 7.x because of CDI 2.0.

Regarding the fail, I’m not sure what is wrong. I remember seeing that before 
and I think it got fixed when we added the JsonB JAX-RS Provider. Maybe there 
is a regression in some place.

Cheers,
Roberto

> On 22 Nov 2018, at 21:08, Romain Manni-Bucau  wrote:
> 
> Hi Ivan
> 
> Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally if 
> johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)
> 
> Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  > a écrit :
> Also there are a lot of properties being returned on that payload that are 
> not needed like rate1, rate5... etc.
> 
> 
> 
> On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho  > wrote:
> The issue with the TCK is because meter in the spec expects fifteenMinRate 
> instead of fifteenMinuteRate.
> 
> Same apply for the other properties like fiveMin..oneMin..
> 
> @JsonbProperty("fifteenMinRate") is probably being ignored.
> 
> 
> 
> 
> On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho  > wrote:
> Hey Romain, it is actually a mapping issue. I created the PR but the 
> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if the 
> PR is reliable.
> https://github.com/apache/geronimo-metrics/pull/2 
> 
> 
> I will try to check what is going on with the TCK on TomEE, if you have any 
> tips let me know.
> 
> 
> 
> 
> 
> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau  > wrote:
> Hi Ivan
> 
> It is a bug in tomee scanning I think
> 
> 
> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  > a
> écrit :
> 
> > Hey guys, I was writing an example of metrics gauge (WIP).
> >
> > https://github.com/apache/tomee/pull/213 
> > 
> >
> > And I found a bug when trying access a gauge with "Accept:
> > application/json".
> >
> > Just to let you know that I will work on a fix for this:
> >
> > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
> > org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> > and
> > org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> > are equal candidates for handling the current request which can lead to
> > unpredictable results
> > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem with
> > writing the data, class java.util.Collections$SingletonMap, ContentType:
> > application/json
> > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
> > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor for
> > {
> > http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
> >  
> > 
> > has thrown exception, unwinding now
> >  org.apache.cxf.interceptor.Fault
> > at
> > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
> > at
> > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
> > at
> > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
> > at
> > org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
> > at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > at
> > org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
> > at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > at
> > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> > at
> > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> > at
> > org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
> > at
> > org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
> > at
> > 

Re: Metrics Gauge Example and Bug

2018-11-22 Thread Romain Manni-Bucau
Hi Ivan

Do you use tomee 8 with johnzon 1.1.10? Works well on this one normally if
johnzon defaults are not broken. On tomee 7 you need to add jsonb ;)

Le jeu. 22 nov. 2018 21:51, Ivan Junckes Filho  a
écrit :

> Also there are a lot of properties being returned on that payload that are
> not needed like rate1, rate5... etc.
>
>
>
> On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho 
> wrote:
>
>> The issue with the TCK is because meter in the spec
>> expects fifteenMinRate instead of fifteenMinuteRate.
>>
>> Same apply for the other properties like fiveMin..oneMin..
>>
>> @JsonbProperty("fifteenMinRate") is probably being ignored.
>>
>>
>>
>>
>> On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho 
>> wrote:
>>
>>> Hey Romain, it is actually a mapping issue. I created the PR but the
>>> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
>>> the PR is reliable.
>>> https://github.com/apache/geronimo-metrics/pull/2
>>>
>>> I will try to check what is going on with the TCK on TomEE, if you have
>>> any tips let me know.
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau <
>>> rmannibu...@gmail.com> wrote:
>>>
 Hi Ivan

 It is a bug in tomee scanning I think


 Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho 
 a
 écrit :

 > Hey guys, I was writing an example of metrics gauge (WIP).
 >
 > https://github.com/apache/tomee/pull/213
 >
 > And I found a bug when trying access a gauge with "Accept:
 > application/json".
 >
 > Just to let you know that I will work on a fix for this:
 >
 > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
 > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare
 Both
 >
 org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
 > and
 >
 org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
 > are equal candidates for handling the current request which can lead
 to
 > unpredictable results
 > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
 > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem
 Problem with
 > writing the data, class java.util.Collections$SingletonMap,
 ContentType:
 > application/json
 > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
 > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging
 Interceptor for
 > {
 >
 http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
 > has thrown exception, unwinding now
 >  org.apache.cxf.interceptor.Fault
 > at
 >
 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
 > at
 >
 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
 > at
 >
 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
 > at
 >
 org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
 > at
 >
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
 > at
 >
 org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
 > at
 >
 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
 > at
 >
 org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
 > at
 >
 org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
 > at
 >
 org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
 > at
 >
 org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 > at
 org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 > at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 > at
 >
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
 > at
 >
 org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
 > at
 >
 

Re: Metrics Gauge Example and Bug

2018-11-22 Thread Ivan Junckes Filho
Also there are a lot of properties being returned on that payload that are
not needed like rate1, rate5... etc.



On Thu, Nov 22, 2018 at 6:26 PM Ivan Junckes Filho 
wrote:

> The issue with the TCK is because meter in the spec expects fifteenMinRate
> instead of fifteenMinuteRate.
>
> Same apply for the other properties like fiveMin..oneMin..
>
> @JsonbProperty("fifteenMinRate") is probably being ignored.
>
>
>
>
> On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho 
> wrote:
>
>> Hey Romain, it is actually a mapping issue. I created the PR but the
>> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
>> the PR is reliable.
>> https://github.com/apache/geronimo-metrics/pull/2
>>
>> I will try to check what is going on with the TCK on TomEE, if you have
>> any tips let me know.
>>
>>
>>
>>
>>
>> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau 
>> wrote:
>>
>>> Hi Ivan
>>>
>>> It is a bug in tomee scanning I think
>>>
>>>
>>> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  a
>>> écrit :
>>>
>>> > Hey guys, I was writing an example of metrics gauge (WIP).
>>> >
>>> > https://github.com/apache/tomee/pull/213
>>> >
>>> > And I found a bug when trying access a gauge with "Accept:
>>> > application/json".
>>> >
>>> > Just to let you know that I will work on a fix for this:
>>> >
>>> > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
>>> > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
>>> >
>>> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
>>> > and
>>> >
>>> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
>>> > are equal candidates for handling the current request which can lead to
>>> > unpredictable results
>>> > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
>>> > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem
>>> with
>>> > writing the data, class java.util.Collections$SingletonMap,
>>> ContentType:
>>> > application/json
>>> > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
>>> > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging
>>> Interceptor for
>>> > {
>>> >
>>> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
>>> > has thrown exception, unwinding now
>>> >  org.apache.cxf.interceptor.Fault
>>> > at
>>> >
>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
>>> > at
>>> >
>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
>>> > at
>>> >
>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
>>> > at
>>> >
>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
>>> > at
>>> >
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>>> > at
>>> >
>>> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
>>> > at
>>> >
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>>> > at
>>> >
>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>>> > at
>>> >
>>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
>>> > at
>>> >
>>> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
>>> > at
>>> >
>>> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>> > at
>>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>> > at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>> > at
>>> >
>>> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>>> > at
>>> >
>>> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>>> > at
>>> >

Re: Metrics Gauge Example and Bug

2018-11-22 Thread Ivan Junckes Filho
The issue with the TCK is because meter in the spec expects fifteenMinRate
instead of fifteenMinuteRate.

Same apply for the other properties like fiveMin..oneMin..

@JsonbProperty("fifteenMinRate") is probably being ignored.




On Thu, Nov 22, 2018 at 5:46 PM Ivan Junckes Filho 
wrote:

> Hey Romain, it is actually a mapping issue. I created the PR but the
> microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
> the PR is reliable.
> https://github.com/apache/geronimo-metrics/pull/2
>
> I will try to check what is going on with the TCK on TomEE, if you have
> any tips let me know.
>
>
>
>
>
> On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau 
> wrote:
>
>> Hi Ivan
>>
>> It is a bug in tomee scanning I think
>>
>>
>> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  a
>> écrit :
>>
>> > Hey guys, I was writing an example of metrics gauge (WIP).
>> >
>> > https://github.com/apache/tomee/pull/213
>> >
>> > And I found a bug when trying access a gauge with "Accept:
>> > application/json".
>> >
>> > Just to let you know that I will work on a fix for this:
>> >
>> > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
>> > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
>> >
>> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
>> > and
>> >
>> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
>> > are equal candidates for handling the current request which can lead to
>> > unpredictable results
>> > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
>> > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem
>> with
>> > writing the data, class java.util.Collections$SingletonMap, ContentType:
>> > application/json
>> > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
>> > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor
>> for
>> > {
>> >
>> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
>> > has thrown exception, unwinding now
>> >  org.apache.cxf.interceptor.Fault
>> > at
>> >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
>> > at
>> >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
>> > at
>> >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
>> > at
>> >
>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
>> > at
>> >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>> > at
>> >
>> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
>> > at
>> >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>> > at
>> >
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>> > at
>> >
>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
>> > at
>> >
>> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
>> > at
>> >
>> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>> > at
>> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>> > at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>> > at
>> >
>> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>> > at
>> >
>> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
>> > at
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
>> > at
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
>> > at
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
>> > at 

Re: Metrics Gauge Example and Bug

2018-11-22 Thread Ivan Junckes Filho
Hey Romain, it is actually a mapping issue. I created the PR but the
microprofile metrics TCK seems to be broken on TomEE, so I am not sure if
the PR is reliable.
https://github.com/apache/geronimo-metrics/pull/2

I will try to check what is going on with the TCK on TomEE, if you have any
tips let me know.





On Wed, Nov 21, 2018 at 7:59 PM Romain Manni-Bucau 
wrote:

> Hi Ivan
>
> It is a bug in tomee scanning I think
>
>
> Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  a
> écrit :
>
> > Hey guys, I was writing an example of metrics gauge (WIP).
> >
> > https://github.com/apache/tomee/pull/213
> >
> > And I found a bug when trying access a gauge with "Accept:
> > application/json".
> >
> > Just to let you know that I will work on a fix for this:
> >
> > 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
> >
> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> > and
> >
> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> > are equal candidates for handling the current request which can lead to
> > unpredictable results
> > 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> > org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem
> with
> > writing the data, class java.util.Collections$SingletonMap, ContentType:
> > application/json
> > 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
> > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor
> for
> > {
> >
> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
> > has thrown exception, unwinding now
> >  org.apache.cxf.interceptor.Fault
> > at
> >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
> > at
> >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
> > at
> >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
> > at
> >
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
> > at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > at
> >
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
> > at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> > at
> >
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> > at
> >
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> > at
> >
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
> > at
> >
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at
> >
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at
> >
> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
> > at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> > at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
> > at
> >
> 

Re: Metrics Gauge Example and Bug

2018-11-21 Thread Romain Manni-Bucau
Hi Ivan

It is a bug in tomee scanning I think


Le mer. 21 nov. 2018 21:35, Ivan Junckes Filho  a
écrit :

> Hey guys, I was writing an example of metrics gauge (WIP).
>
> https://github.com/apache/tomee/pull/213
>
> And I found a bug when trying access a gauge with "Accept:
> application/json".
>
> Just to let you know that I will work on a fix for this:
>
> 21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
> org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
> org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
> and
> org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
> are equal candidates for handling the current request which can lead to
> unpredictable results
> 21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
> org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem with
> writing the data, class java.util.Collections$SingletonMap, ContentType:
> application/json
> 21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
> org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor for
> {
> http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
> has thrown exception, unwinding now
>  org.apache.cxf.interceptor.Fault
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
> at
> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
> at
> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
> at
> org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
> at
> org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at
> org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at
> org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
> at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
> at
> org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
> at
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
> at
> org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
> at
> org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
> at
> org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
> at
> 

Metrics Gauge Example and Bug

2018-11-21 Thread Ivan Junckes Filho
Hey guys, I was writing an example of metrics gauge (WIP).

https://github.com/apache/tomee/pull/213

And I found a bug when trying access a gauge with "Accept:
application/json".

Just to let you know that I will work on a fix for this:

21-Nov-2018 17:24:08.811 WARNING [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.model.OperationResourceInfoComparator.compare Both
org.apache.geronimo.microprofile.metrics.common.jaxrs.MetricsEndpoints#getJson
and
org.apache.geronimo.microprofile.metrics.jaxrs.CdiMetricsEndpoints#getJson
are equal candidates for handling the current request which can lead to
unpredictable results
21-Nov-2018 17:26:52.183 SEVERE [http-nio-8080-exec-4]
org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem Problem with
writing the data, class java.util.Collections$SingletonMap, ContentType:
application/json
21-Nov-2018 17:26:52.184 WARNING [http-nio-8080-exec-4]
org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Interceptor for
{
http://jaxrs.common.metrics.microprofile.geronimo.apache.org/}MetricsEndpoints
has thrown exception, unwinding now
 org.apache.cxf.interceptor.Fault
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleWriteException(JAXRSOutInterceptor.java:396)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.serializeMessage(JAXRSOutInterceptor.java:272)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processResponse(JAXRSOutInterceptor.java:122)
at
org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(JAXRSOutInterceptor.java:84)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:90)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.doInvoke(CxfRsHttpListener.java:253)
at
org.apache.tomee.webservices.CXFJAXRSFilter.doFilter(CXFJAXRSFilter.java:94)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.openejb.server.httpd.EEFilter.doFilter(EEFilter.java:65)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.apache.tomee.microprofile.jwt.MPJWTFilter.doFilter(MPJWTFilter.java:64)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.apache.geronimo.microprofile.opentracing.microprofile.server.OpenTracingFilter.doFilter(OpenTracingFilter.java:126)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at
org.apache.tomee.catalina.OpenEJBSecurityListener$RequestCapturer.invoke(OpenEJBSecurityListener.java:97)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at