Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalAccessError for gauges with Micrometer + MP Metrics binder #20047

Closed
jmartisk opened this issue Sep 10, 2021 · 1 comment · Fixed by #20048
Closed

IllegalAccessError for gauges with Micrometer + MP Metrics binder #20047

jmartisk opened this issue Sep 10, 2021 · 1 comment · Fixed by #20048
Labels
Milestone

Comments

@jmartisk
Copy link
Contributor

Describe the bug

Creating an annotated org.eclipse.microprofile.metrics.annotation.Gauge when I use the Micrometer with the MP Metrics binder causes an error during gauge registration:

2021-09-10 07:40:04,106 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.IllegalAccessError: failed to access class io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetadata from class org.acme.GreetingResource_GaugeAdapter_Subclass (io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetadata is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @a73ea75; org.acme.GreetingResource_GaugeAdapter_Subclass is in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @4fdd30b2)
	at org.acme.GreetingResource_GaugeAdapter_Subclass.getMetadata(GreetingResource_GaugeAdapter_Subclass.zig:732)
	at org.acme.GreetingResource_GaugeAdapter_ClientProxy.getMetadata(GreetingResource_GaugeAdapter_ClientProxy.zig:276)
	at io.quarkus.micrometer.runtime.binder.mpmetrics.MetricRegistryAdapter.bindAnnotatedGauge(MetricRegistryAdapter.java:233)
	at io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetricsBinder.bindTo(MpMetricsBinder.java:30)
	at io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetricsBinder_Subclass.bindTo$$superforward1(MpMetricsBinder_Subclass.zig:98)
	at io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetricsBinder_Subclass$$function$$1.apply(MpMetricsBinder_Subclass$$function$$1.zig:33)
	at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
	at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
	at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:51)
	at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
	at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
	at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
	at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
	at io.quarkus.micrometer.runtime.binder.mpmetrics.MpMetricsBinder_Subclass.bindTo(MpMetricsBinder_Subclass.zig:162)
	at io.quarkus.micrometer.runtime.MicrometerRecorder.lambda$configureRegistries$4(MicrometerRecorder.java:130)
	at java.base/java.lang.Iterable.forEach(Iterable.java:75)
	at io.quarkus.micrometer.runtime.MicrometerRecorder.configureRegistries(MicrometerRecorder.java:130)
	at io.quarkus.deployment.steps.MicrometerProcessor$configureRegistry-2125003310.deploy_0(MicrometerProcessor$configureRegistry-2125003310.zig:127)
	at io.quarkus.deployment.steps.MicrometerProcessor$configureRegistry-2125003310.deploy(MicrometerProcessor$configureRegistry-2125003310.zig:40)
	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:766)
	at io.quarkus.runtime.Application.start(Application.java:101)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:101)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:100)
	at java.base/java.lang.Thread.run(Thread.java:834)

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06) OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus 2.2.2

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Happens only in JVM mode

@jmartisk jmartisk added kind/bug Something isn't working area/metrics labels Sep 10, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 10, 2021

/cc @ebullient, @kenfinnigan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants