StephenOTT / camunda-prometheus-process-engine-plugin

Monitor your KPIs!!! Camunda BPM Process Engine Plugin providing Prometheus Monitoring, Metric classes for various BPMN use, Grafana Annotations, and HTTPServer data export: Used to generate Prometheus metrics anywhere in the Engine, including BPMN, CMN, and DMN engines and instances.
MIT License
53 stars 23 forks source link

Try to install in wildfly fail because is using sun.misc.ServiceConfigurationError and it's support to until java 8 #39

Open joaopalma5 opened 3 years ago

joaopalma5 commented 3 years ago

Hello I'm trying to install this plugin in wildfly but this plugin uses sun.misc* and only is suppurted by java <= 8... You can update the package?

I'm using docker image: camunda/camunda-bpm-platform:wildfly-7.14.0

sun.misc.is available for Java <= 8 java.util.is available in Java >= 8

ERROR: 19:37:28,504 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 80) MSC000001: Failed to start service org.camunda.bpm.platform.process-engine.default: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-engine.default: java.lang.NoClassDefFoundError: sun/misc/ServiceConfigurationError

StephenOTT commented 3 years ago

Have you identified what code or dep is using that package?

joaopalma5 commented 3 years ago

Caused by: java.lang.NoClassDefFoundError: sun/misc/ServiceConfigurationError camundaa_1 | at com.sun.net.httpserver//com.sun.net.httpserver.HttpServer.create(HttpServer.java:110) camundaa_1 | at io.digitalstate.camunda.prometheus//io.prometheus.client.exporter.HTTPServer.(HTTPServer.java:166) camundaa_1 | at io.digitalstate.camunda.prometheus//io.prometheus.client.exporter.HTTPServer.(HTTPServer.java:180) camundaa_1 | at io.digitalstate.camunda.prometheus//io.prometheus.client.exporter.HTTPServer.(HTTPServer.java:187) camundaa_1 | at io.digitalstate.camunda.prometheus//io.digitalstate.camunda.prometheus.MetricsExporter.(MetricsExporter.java:20) camundaa_1 | at io.digitalstate.camunda.prometheus//io.digitalstate.camunda.prometheus.PrometheusProcessEnginePlugin.preInit(PrometheusProcessEnginePlugin.java:93) (...) Caused by: java.lang.ClassNotFoundException: sun.misc.ServiceConfigurationError from [Module "com.sun.net.httpserver" from local module loader @29df4d43 (finder: local module finder @5dd91bca (roots: /camunda/modules,/camunda/modules/system/layers/base))]

Meanwhile, I see other error with org.joda.time. And this module is present two times with different versions, in camunda/camunda-bpm-platform:wildfly-7.12.0 (I make downgrade for tests), 2.1 in modules/org/joda/time/2.1/joda-time-2.1.jar and modules/system/layers/base/org/joda/time/main/joda-time-2.9.7.jar . In camunda/camunda-bpm-platform:wildfly-7.14.0, is present 2.1 in modules/joda-time/joda-time/main/joda-time-2.1.jar and 2.9.7 in modules/system/layers/base/org/joda/time/main/joda-time-2.9.7.jar

15:05:44,398 WARN [org.jboss.modules.define] (ServerService Thread Pool -- 78) {} Failed to define class org.joda.time.DateTime in Module "org.joda.time:2.1" version 2.1 from local module loader @29df4d43 (finder: local module finder @5dd91bca (roots: /camunda/modules,/camunda/modules/system/layers/base)): java.lang.LinkageError: Failed to link org/joda/time/DateTime (Module "org.joda.time:2.1" version 2.1 from local module loader @29df4d43 (finder: local module finder @5dd91bca (roots: /camunda/modules,/camunda/modules/system/layers/base))): loader constraint violation: loader 'org.joda.time:2.1@2.1' @546650c5 wants to load class org.joda.time.DateTime. A different class with the same name was previously loaded by 'org.joda.time@2.9.7' @2b4d0211. (org.joda.time.DateTime is in unnamed module of loader 'org.joda.time@2.9.7' @2b4d0211, parent loader 'app')

StephenOTT commented 3 years ago

You can try changing the version of the Prometheus dependency jar to a version that supports your needs. Can you test with camunda wildly 7.12 and see if you have the same error? Maybe something specific to wildfly.