NullPointerException at org.wildfly.extension.microprofile.metrics.PrometheusCollector.addMetricFamilySampleSupplier(PrometheusCollector.java:32)
lafr Mar 27, 2019 1:39 PMHello,
I'm using Wildfly-16.0 with Oracle Java JDK 8 on SPARC Solaris 10 / 11.
During startup I get one or two exceptions like this one here:
27.03. 18:24:19,131 ERROR [org.jboss.msc.service.fail#startFailed] MSC000001: Failed to start service jboss.deployment.unit."web-bdo.war".metrics: org.jboss.msc.service.StartException in service jboss.deployment.unit."web-bdo.war".metrics: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1730) at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.NullPointerException at org.wildfly.extension.microprofile.metrics.PrometheusCollector.addMetricFamilySampleSupplier(PrometheusCollector.java:32) at org.wildfly.extension.microprofile.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:157) at org.wildfly.extension.microprofile.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:166) at org.wildfly.extension.microprofile.metrics.MetricCollector.collectResourceMetrics0(MetricCollector.java:166) at org.wildfly.extension.microprofile.metrics.MetricCollector.collectResourceMetrics(MetricCollector.java:92) at org.wildfly.extension.microprofile.metrics.deployment.DeploymentMetricService.start(DeploymentMetricService.java:54) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738) at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700) ... 6 more
The application itself which got this exception seems to be working without any problems.
I did not see this on my test machine with 2 quite slow processors. But now on our development server with 8 faster CPUs this comes up.
What to do?
Can I remove the microprofile subsystems from the config?
<extension module="org.wildfly.extension.microprofile.config-smallrye"/>
<extension module="org.wildfly.extension.microprofile.health-smallrye"/>
<extension module="org.wildfly.extension.microprofile.metrics-smallrye"/>
<extension module="org.wildfly.extension.microprofile.opentracing-smallrye"/>
As far as I understodd, I won't need them, as we will run the Wildfly server directly on Windows or Solaris or AIX boxes without any containers like docker.
Regards, Frank