quarkus: SmallRyeMetricsProcessor Unsupported api 524288

how to reproduce

git clone https://github.com/xmlking/micro-apps.git
gradle :apps:greeting-service:quarkusBuild -x test

Error

    [error]: Build step io.quarkus.smallrye.metrics.deployment.SmallRyeMetricsProcessor#registerBaseAndVendorMetrics threw an exception: java.lang.IllegalArgumentException: Unsupported api 524288
        at org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:74)
        at io.quarkus.gizmo.GizmoClassVisitor.<init>(GizmoClassVisitor.java:22)
        at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:150)
        at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
        at io.quarkus.deployment.proxy.ProxyFactory.doDefineClass(ProxyFactory.java:189)
        at io.quarkus.deployment.proxy.ProxyFactory.defineClass(ProxyFactory.java:120)
        at io.quarkus.deployment.proxy.ProxyFactory.newInstance(ProxyFactory.java:204)
        at io.quarkus.deployment.recording.BytecodeRecorderImpl.getRecordingProxy(BytecodeRecorderImpl.java:286)
        at io.quarkus.deployment.ExtensionLoader.lambda$loadStepsFrom$85(ExtensionLoader.java:759)
        at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:928)
        at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
        at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
        at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
        at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
        at java.base/java.lang.Thread.run(Thread.java:834)
        at org.jboss.threads.JBossThread.run(JBossThread.java:479)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (13 by maintainers)

Most upvoted comments

I have the problem with Quarkus 1.6.0.Final using @QuarkusTest when launching the tests from Intellij.

java.lang.RuntimeException: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors [error]: Build step io.quarkus.smallrye.health.deployment.SmallRyeHealthProcessor#build threw an exception: java.lang.IllegalArgumentException: Unsupported api 524288 at org.objectweb.asm.ClassVisitor.<init>(ClassVisitor.java:70) at io.quarkus.gizmo.GizmoClassVisitor.<init>(GizmoClassVisitor.java:22) at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:150) at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203) at io.quarkus.deployment.proxy.ProxyFactory.doDefineClass(ProxyFactory.java:189) at io.quarkus.deployment.proxy.ProxyFactory.defineClass(ProxyFactory.java:120) at io.quarkus.deployment.proxy.ProxyFactory.newInstance(ProxyFactory.java:204) at io.quarkus.deployment.recording.BytecodeRecorderImpl.getRecordingProxy(BytecodeRecorderImpl.java:286) at io.quarkus.deployment.ExtensionLoader.lambda$loadStepsFrom$85(ExtensionLoader.java:759) at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:928) at io.quarkus.builder.BuildContext.run(BuildContext.java:277) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452) at java.base/java.lang.Thread.run(Thread.java:834) at org.jboss.threads.JBossThread.run(JBossThread.java:479)

[error]: Build step io.quarkus.vertx.http.deployment.HttpSecurityProcessor#initBasicAuth threw an exception: java.lang.IllegalArgumentException: Unsupported api 524288

Yeah, hopefully, the next GraalVM update will fix it.

For now, if not using GraalVM, you can exclude the org.graalvm.nativeimage:svm dependency.

There is a discrepancy in ASM dependencies, the Bootstrap project indeed depends on 7.3.1 (https://github.com/quarkusio/quarkus/blob/edd539f29c305ab908ed6bcd315821e1e5beb137/independent-projects/bootstrap/pom.xml#L44) while the runtime bom is already at 8.0.1 (https://github.com/quarkusio/quarkus/blob/edd539f29c305ab908ed6bcd315821e1e5beb137/bom/runtime/pom.xml#L68)

However, I tried updating the Bootstrap dependency to 8.0.1 and I’m weirdly still seeing the exception even though ASM 7.3.1 does not appear in gradle dependencies output anymore at all. The exception suggests that ASM 7.3.1 is still there somewhere, because the line ClassVisitor.java:74 corresponds to the exception there, and it does not correspond to that exception in 8.0.1.