java.lang.NoSuchFieldError: UNKNOWN while using jmx_exporter as javaagent

221 views
Skip to first unread message

Jai Bheemsen Rao Dhanwada

unread,
Aug 18, 2022, 1:31:42 AM8/18/22
to promethe...@googlegroups.com
Hello,

I am using jmx_exporter as javaagent and when I build 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

Jai Bheemsen Rao Dhanwada

unread,
Aug 19, 2022, 2:37:47 PM8/19/22
to Prometheus Users
I had a older version of jar in the classpath which was conflicting, after removing it's working fine. thanks
Reply all
Reply to author
Forward
0 new messages