Skip to content

Multiple GeneratedClassBuildItem were produced for the same classes when using abstract class #50314

@jedla97

Description

@jedla97

Describe the bug

Hi, I spot in one of our test module when using the abstract class the follow up error is present

[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.lang.IllegalStateException: Multiple GeneratedClassBuildItem were produced for the same classes:
[ERROR] 
[ERROR] - org.acme.tracable.TraceableResource$quarkusrestinvoker$getLastTraceId_3736e02108c2d04115908baa7a205acb1fee7076: 2

It probably introduced by #50278.

We have one abstract class defining endpoint. This class is used on SSE ping and pong resources (For testing we extend even grpc resource by it, for it's not present in reproducer).

I try to remove the endpoint annotation from affected method and it's possible to build it.

For more info see the reproducer.

Expected behavior

Build the jar without errors

Actual behavior

[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.lang.IllegalStateException: Multiple GeneratedClassBuildItem were produced for the same classes:
[ERROR] 
[ERROR] - org.acme.tracable.TraceableResource$quarkusrestinvoker$getLastTraceId_3736e02108c2d04115908baa7a205acb1fee7076: 2

How to Reproduce?

  1. git clone -b multple-generated-items [email protected]:jedla97/quarkus-reproducers.git
  2. cd quarkus-reproducers
  3. mvn clean package -DskipTests
  4. The error is there

Output of uname -a or ver

No response

Output of java -version

21.0.2+13-58

Quarkus version or git rev

main

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

Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions