OpenNTF / org.openntf.xsp.jakartaee

XPages Jakarta EE support libraries
Apache License 2.0
21 stars 7 forks source link

Observed IllegalStateException during app use for an MP-Metrics-wrapped method #549

Closed jesse-gallagher closed 3 weeks ago

jesse-gallagher commented 1 month ago

This is, unfortunately, not reproducible, so it may be very difficult to track down. Once it occurred, it remained the case until HTTP restart.

This occurred in 2.15.0 on Domino 12.

java.lang.IllegalStateException: SRMET00003: No metric mapped for public jakarta.ws.rs.core.Response com.clientname.service.API.addProduct(jakarta.json.JsonObject)
  at io.smallrye.metrics.interceptors.TimedInterceptor.timedCallable(TimedInterceptor.java:79)
  at io.smallrye.metrics.interceptors.TimedInterceptor.timedMethod(TimedInterceptor.java:65)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:73)
  at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
  at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
  at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
  at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
  at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
  at org.jboss.weld.generated.proxies.default.FieldsAPI$Proxy$_$$_WeldSubclass.addProduct(Unknown Source)
  at org.jboss.weld.generated.proxies.default.FieldsAPI$Proxy$_$$_WeldClientProxy.addProduct(Unknown Source)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:170)
  at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:130)
  at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
  at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
  at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
  at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
  at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
  at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
  at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
  at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
  at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
  at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
  at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
  at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
  at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
  at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
  at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:249)
  at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:60)
  at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
  /* snip - core and XPages JEE code*/
  at com.mindoo.domino.jna.xsp.http.DominoJNAHttpService$2.call(DominoJNAHttpService.java:76)
  at com.mindoo.domino.jna.xsp.http.DominoJNAHttpService$2.call(DominoJNAHttpService.java:1)
  at com.mindoo.domino.jna.gc.NotesGC$3.run(NotesGC.java:557)
  at java.security.AccessController.doPrivileged(AccessController.java:690)
  at com.mindoo.domino.jna.gc.NotesGC.runWithAutoGC(NotesGC.java:552)
  at com.mindoo.domino.jna.xsp.http.DominoJNAHttpService.doService(DominoJNAHttpService.java:68)
  /* snip - core code */
jesse-gallagher commented 1 month ago

My going theory is that part of Metrics sticks around after the app's normal lifetime. As I recall, some of (but not all) of the MP specs use global containers like this, and Metrics could too.