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

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

Closed
kjq opened this issue Oct 29, 2023 · 10 comments · Fixed by #289
Closed

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

kjq opened this issue Oct 29, 2023 · 10 comments · Fixed by #289

Comments

@kjq
Copy link

kjq commented Oct 29, 2023

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)
@Sgitario
Copy link
Contributor

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
Copy link
Author

kjq commented Oct 30, 2023

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

@Sgitario
Copy link
Contributor

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?

@iocanel
Copy link
Contributor

iocanel commented Oct 30, 2023

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

@kjq
Copy link
Author

kjq commented Oct 30, 2023

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?

@Sgitario
Copy link
Contributor

3.7

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

@iocanel
Copy link
Contributor

iocanel commented Oct 30, 2023

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

@Sgitario
Copy link
Contributor

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!

This was referenced Oct 30, 2023
@manusa
Copy link

manusa commented Oct 30, 2023

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

@Sgitario
Copy link
Contributor

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.

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