camunda-prometheus-process-engine-plugin icon indicating copy to clipboard operation
camunda-prometheus-process-engine-plugin copied to clipboard

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

Open joaopalma5 opened this issue 5 years ago • 3 comments

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

joaopalma5 avatar Mar 04 '21 19:03 joaopalma5

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

StephenOTT avatar Mar 04 '21 21:03 StephenOTT

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:[email protected]' @546650c5 wants to load class org.joda.time.DateTime. A different class with the same name was previously loaded by '[email protected]' @2b4d0211. (org.joda.time.DateTime is in unnamed module of loader '[email protected]' @2b4d0211, parent loader 'app')

joaopalma5 avatar Mar 05 '21 15:03 joaopalma5

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.

StephenOTT avatar Mar 06 '21 17:03 StephenOTT