rh-messaging / artemis-prometheus-metrics-plugin

Apache License 2.0
22 stars 20 forks source link

fix: resolve NoClassDefFoundError for jakarta.servlet.http.HttpServlet #30

Closed Jean-Emile closed 5 months ago

brusdev commented 5 months ago

@Jean-Emile artemis-prometheus-metrics-plugin 3.x was intentionally updated to jakarta.servlet. You can use artemis-prometheus-metrics-plugin 2.x for ActiveMQArtemis versions that require javax.servlet.

evannorstrand-mp commented 5 months ago

@brusdev - I am using the latest artemis release which is 2.33.0 created ~15 days ago, and this issue is occurring. Which version should I be using?

brusdev commented 5 months ago

@Jean-Emile artemis-prometheus-metrics-plugin 3.x is for future ActiveMQArtemis versions. You can use artemis-prometheus-metrics-plugin 2.1.0 for ActiveMQArtemis 2.33.0.

smithpj commented 5 months ago

I ran into this issue when running artemis 2.32 on Java 17. I applied the patch that was closed/not merged here and recompiled with those jakarta/javax changes and it solved the issue for me.

brusdev commented 5 months ago

@smithpj what artemis-prometheus-metrics-plugin version should I use to reproduce your issue with artemis 2.32 on Java 17?

smithpj commented 5 months ago

I was running artemis-prometheus-metrics-plugin 3.0 (not knowing it wasn't for artemis 2.32). The changes in the patch to use javax over jakarta and other minor things in this PR did get metrics working for me however.

brusdev commented 5 months ago

@smithpj I confirm artemis-prometheus-metrics-plugin 3.0 must not be used with artemis 2.32, have you tried artemis-prometheus-metrics-plugin 2.1.0 with artemis 2.32 on Java 17?

smithpj commented 5 months ago

@brusdev I have not used 2.1.0 as I figured the newest version would be for the latest version of Artemis. Is there a release date set for the newer Artemis that uses the 3.0 plugin?

brusdev commented 5 months ago

@smithpj there are no plan yet for a newer Apache ActiveMQ Artemis version that requires the 3.0 plugin. Please use the 2.x plugin.