metrics NPE

10 views
Skip to first unread message

Hans Pikkemaat

unread,
Oct 8, 2021, 5:18:50 AM10/8/21
to Payara Forum
Hi

I'm happily using microprofile metrics.

However when my server has just started and my application has deployed and when I start posting requests I sometimes see

>Caused by: java.lang.NullPointerException
at fish.payara.microprofile.metrics.cdi.interceptor.AbstractInterceptor.getMetric(AbstractInterceptor.java:84)
at fish.payara.microprofile.metrics.cdi.interceptor.SimplyTimedInterceptor.getMetric(SimplyTimedInterceptor.java:56)
at fish.payara.microprofile.metrics.cdi.interceptor.AbstractInterceptor.apply(AbstractInterceptor.java:74)
at fish.payara.microprofile.metrics.cdi.interceptor.SimplyTimedInterceptor.proceedTimed(SimplyTimedInterceptor.java:72)
at fish.payara.microprofile.metrics.cdi.interceptor.SimplyTimedInterceptor.applyInterceptor(SimplyTimedInterceptor.java:64)
at fish.payara.microprofile.metrics.cdi.interceptor.AbstractInterceptor.preInterceptor(AbstractInterceptor.java:109)
at fish.payara.microprofile.metrics.cdi.interceptor.AbstractInterceptor.methodInvocation(AbstractInterceptor.java:94)

This only happens during startup so it looks like some race condition.

Could it be that metrics has not been fully initialized when my applications starts running? 

I tried to reproduce this in a simple application but without success. Usually the problem with race conditions :(

I hope you can help.

regards,

Hans

Payara

unread,
Oct 8, 2021, 8:33:40 AM10/8/21
to CLOSED. Payara Forum. Go to forum.payara.fish.
Thank you for your question. We are in the process of moving our community discussions and questions to a new location: forum.payara.fish. Please follow this link to find your question, and one of our engineers will be answering it shortly. 
Reply all
Reply to author
Forward
0 new messages