quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.24k stars 2.52k forks source link

No Converter registered for class io.quarkus.maven.dependency.GACT with version 3.10+ #40621

Open effusion opened 2 weeks ago

effusion commented 2 weeks ago

Describe the bug

We use Quarkus (BOM version 3.9.3) in one of our projects. After upgrading to 3.10.0, the build no longer runs and throws an error when generating the Java classes from the .avsc files. I suspect Smallrye because it's the only lib which currently generates code. The build works in another project where we use the .avdl files.

Expected behavior

Compilation works, and the Java classes for the AVSC files are generated.

Actual behavior

AVSC files placed in the Avro directory can no longer be compiled, and the build crashes with the following exception: Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed: java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for class io.quarkus.maven.dependency.GACT See the full stacktrace in the build.log file attached.

How to Reproduce?

  1. Create a new Quarkus project with Smallrye messaging.
  2. Create the folder "src/main/avro"
  3. Add an *.avsc file
  4. Execute gradle clean build

Output of uname -a or ver

Darwin ultima-thule.localdomain 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64

Output of java -version

openjdk version "21.0.1" 2023-10-17 LTS OpenJDK Runtime Environment Zulu21.30+15-CA (build 21.0.1+12-LTS) OpenJDK 64-Bit Server VM Zulu21.30+15-CA (build 21.0.1+12-LTS, mixed mode, sharing)

Quarkus version or git rev

3.10.0

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

------------------------------------------------------------ Gradle 8.7 ------------------------------------------------------------ Build time: 2024-03-22 15:52:46 UTC Revision: 650af14d7653aa949fce5e886e685efc9cf97c10 Kotlin: 1.9.22 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21.0.1 (Azul Systems, Inc. 21.0.1+12-LTS) OS: Mac OS X 14.4.1 aarch64

Additional information

build.log

quarkus-bot[bot] commented 2 weeks ago

/cc @geoand (kotlin)

VigneshwaranVenugopal commented 2 weeks ago

I have the same issue. I am using jdk 17 as the target version in gradle settings

mzellho commented 2 weeks ago

Same here, but:

uname -a Linux myhost 6.5.0-28-generic #29-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 28 23:46:48 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

java -version

openjdk version "21.0.3" 2024-04-16 LTS
OpenJDK Runtime Environment Temurin-21.0.3+9 (build 21.0.3+9-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.3+9 (build 21.0.3+9-LTS, mixed mode, sharing)

Quarkus Version 3.10.1

I didn't dig in too deep, but I think I remember smallrye-jwt flashing somewhere in the debugger - this may be a dead end, though. Other than that, I am generating clients from OpenAPIs and CXF WSDLs.

ia3andy commented 1 week ago

Just reproduced, with 3.10.1 and kafka-messaging, cc @aloubyansky @cescoffier

ia3andy commented 1 week ago

After a fresh clean install on the parent, everything started working again.. maybe my project was in a weird state? I was in the process of switching to quarkus rest everywhere.

aloubyansky commented 1 week ago

FYI @radcortez

gsmet commented 1 week ago

I suspect Intellij to use something from the previous version and that there is a version mismatch.

radcortez commented 1 week ago

Yes, I had similar issues when running in IntelliJ. Usually, I need to build the project first in the command line, nuke the caches, and reimport everything to get everything working correctly again.

Sadly, if everything works fine with the command line builds, then the issue is something in the IDE.

effusion commented 1 week ago

I just tried it with the newest version, 3.10.1, as well. It does not matter what tool I use to compile(Intellij, Gradle directly or Gradle on the build server). It always fails with the No Converter registered error.

gsmet commented 1 week ago

@effusion and versions are consistent? The BOM and the Gradle plugin are both 3.10.1?

gsmet commented 1 week ago

A reproducer would help if it can be reproduced from Gradle directly.

aloubyansky commented 1 week ago

I remember seeing a reproducer. There was a discussion about another issue, fixing that the producer would fail with this error. I pinged you there Roberto some time ago. It had a different subject, so not sure i'll be able to find it but it was not an IDE issue.

radcortez commented 1 week ago

Unfortunately, I can't remember :(

I was indeed able to reproduce it in the IDE, but not in the command line.

effusion commented 1 week ago

@gsmet, yes, the BOM and the Gradle version are both 3.10.1. I'll try to create a reproducer today.