quarkus: java.lang.ClassCastException when upgrading from 2.16.0.Final to 2.16.1.Final

Describe the bug

After upgrading to Quarkus 2.16.1 this issue started to happen:


 Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
 	[error]: Build step io.quarkus.kubernetes.deployment.KubernetesProcessor#build threw an exception: java.lang.ClassCastException: class java.util.HashMap cannot be cast to class java.lang.String (java.util.HashMap and java.lang.String are in module java.base of loader 'bootstrap')
 	at io.dekorate.docker.adapter.DockerBuildConfigAdapter.newBuilder(DockerBuildConfigAdapter.java:58)
 	at io.dekorate.docker.config.DockerBuildConfigGenerator.addPropertyConfiguration(DockerBuildConfigGenerator.java:48)
 	at io.dekorate.Session.lambda$addPropertyConfiguration$1(Session.java:167)
 	at io.dekorate.Session.addConfiguration(Session.java:183)
 	at io.dekorate.Session.addPropertyConfiguration(Session.java:167)
 	at io.quarkus.kubernetes.deployment.KubernetesProcessor.lambda$build$2(KubernetesProcessor.java:164)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at io.quarkus.kubernetes.deployment.KubernetesProcessor.build(KubernetesProcessor.java:141)
 	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.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
 	at io.quarkus.builder.BuildContext.run(BuildContext.java:281)
 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
 	at java.base/java.lang.Thread.run(Thread.java:829)
 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)

Expected behavior

No issues when upgrading from 2.16.0.Final to 2.16.1.Final

Actual behavior

This seems to be a breaking change that we would not expect to see in a minor release.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

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

No response

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 35 (17 by maintainers)

Commits related to this issue

Most upvoted comments

@Sgitario @gsmet all greem with change from Jose. Will wait for the next bug fix release 😃

Maybe of interest, I have CI env var named DOCKER_REGISTRY_USER and DOCKER_REGISTRY_PASSWORD which seems to be converted to a map for the key docker.registry but docker-annotation expects a string. Removing them fix the build meanwhile.

I don’t use docker-annotation in the project and it’s indeed a good idea to get rid of it from the ground up, but I wonder what would be the long term fix. I guess the generated adapter in dekorate should also not assume the type of the value is what it expects especially with so common variable name.

@Sgitario I’m releasing 2.16.2.Final as we speak and there will be more 2.16 micros for sure. So please fix it in 2.16 too if you can.