I had a older version of jar in the classpath which was conflicting, after removing it's working fine. thanks
On Wednesday, August 17, 2022 at 10:31:42 PM UTC-7 Jai Bheemsen Rao Dhanwada wrote: > Hello, > > I am using jmx_exporter as javaagent > <https://github.com/prometheus/jmx_exporter#running-the-java-agent> and > when I build <https://github.com/prometheus/jmx_exporter#building> the > jar from the latest code, the javaagent fails to comeup with the below > exception. Earlier version(probably built a year ago) was working fine. Am > I missing something? > > Exception in thread "main" java.lang.reflect.InvocationTargetException > 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 > sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) > at > sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401) > Caused by: java.lang.NoSuchFieldError: UNKNOWN > at io.prometheus.jmx.JmxCollector$Rule.<init>(JmxCollector.java:57) > at io.prometheus.jmx.JmxCollector.loadConfig(JmxCollector.java:214) > at io.prometheus.jmx.JmxCollector.<init>(JmxCollector.java:91) > at io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:29) > ... 6 more > -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/7a4dfb77-e674-433e-a162-50215f6b4eafn%40googlegroups.com.

