quarkiverse/quarkus-helm

Getting io/dekorate/helm/config/HelmChartConfigFluentImpl error using Quarkus 3.5.0

Closed this issue · 10 comments

kjq commented

It might be early, but building with the Quarkus 3.5.0 release (because Renovate updated it) gives this error that I comes from the Helm extension:

[ERROR]         [error]: Build step io.quarkiverse.helm.deployment.HelmProcessor#generateResources threw an exception: java.lang.NoClassDefFoundError: io/dekorate/helm/config/HelmChartConfigFluentImpl
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.toDekorateHelmChartConfig(HelmProcessor.java:375)
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.doGenerateResources(HelmProcessor.java:188)
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.generateResources(HelmProcessor.java:160)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:833)

This usually is caused by a compatibility issue with the Quarkus Helm + Quarkus Kubernetes extensions in use. Since I can't reproduce it, can you share a reproducer or provide more details about your project configuration?

kjq commented

Here is a small reproducer created from the Quarkus app generator (v3.5.x) with the following extensions:

    <dependency>
      <groupId>io.quarkiverse.helm</groupId>
      <artifactId>quarkus-helm</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-keycloak-admin-client-reactive</artifactId>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-smallrye-stork</artifactId>
    </dependency>

Run mvn install -U gives a similar exception:

[error]: Build step io.quarkiverse.helm.deployment.HelmProcessor#generateResources threw an exception: java.lang.NoClassDefFoundError: io/dekorate/helm/config/HelmChartConfigFluentImpl

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.5.0:build (default) on project code-with-quarkus: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkiverse.helm.deployment.HelmProcessor#generateResources threw an exception: java.lang.NoClassDefFoundError: io/dekorate/helm/config/HelmChartConfigFluentImpl
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.toDekorateHelmChartConfig(HelmProcessor.java:375)
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.doGenerateResources(HelmProcessor.java:188)
[ERROR]         at io.quarkiverse.helm.deployment.HelmProcessor.generateResources(HelmProcessor.java:160)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR]         at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR]         at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR]         at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:501)
[ERROR] Caused by: java.lang.ClassNotFoundException: io.dekorate.helm.config.HelmChartConfigFluentImpl
[ERROR]         at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
[ERROR]         at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:516)
[ERROR]         at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:466)
[ERROR]         ... 14 more

code-with-quarkus.zip

Thanks for the reproducer.

Honestly, I have no idea why the classloader is trying to load HelmChartConfigFluentImpl. Moreover, the examples we have work with Quarkus 3.5.0.

So, I guess this is caused by the latest Dekorate release. @iocanel does it ring any bell to you?

Sounds like a version mismatch to me.
Seems like quarkus uses dekorate 4 while quakrus-helm is still on 3.7.x

kjq commented

Odd, even if i remove all the dependencies (i also dont use the Keycloak authorizer - that was added when i selected keycloak-admin) and only have Helm I still get the issue.

Am I possibly doing something wrong that it works for you but not me?

3.7

Quarkus Helm does not enforce any dekorate specific version, but just uses the provided by Quarkus.

Sure, but if the Quarkus bom used refers to an earlier version of dekorate it can lead to mismatches.

Odd, even if i remove all the dependencies (i also dont use the Keycloak authorizer - that was added when i selected keycloak-admin) and only have Helm I still get the issue.

Am I possibly doing something wrong that it works for you but not me?

I tried the reproducer with Quarkus 3.4.3 and it worked, so I think your reproducer is ok.

Sure, but if the Quarkus bom used refers to an earlier version of dekorate it can lead to mismatches.

I tried Quarkus Helm from main and I saw no issues now. I don't fully understand why it could lead into version mismatch, but you're right.

@kjq I will release a new version of Quarkus Helm to fix this issue.

Thanks both!

manusa commented

The problem is most likely with the Sundrio-generated classes which are incompatible across different versions (we removed intermediate classes).

The problem is most likely with the Sundrio-generated classes which are incompatible across different versions (we removed intermediate classes).

But I'm not using the class HelmChartConfigFluentImpl, but HelmChartConfigFluent (via the builder).
Anyways, @kjq this should be fixed by using Quarkus Helm 1.2.0.