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

Cannot transform *class as its containing application archive could not be found #16808

Closed
chris-asl opened this issue Apr 26, 2021 · 11 comments
Closed
Labels
kind/bug Something isn't working
Milestone

Comments

@chris-asl
Copy link
Contributor

chris-asl commented Apr 26, 2021

I have created an MCVE where I have the classic greeting resource and I've added a Utility class (private constructor w. one static method).

When using jacoco-extension the tests run just fine, but when adding quarkus-smallrye-openapi, dependency, I get these warnings when running tests:

[INFO] Running org.acme.testcoverage.UtilTest
2021-04-26 16:21:52,863 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform java.lang.Deprecated as its containing application archive could not be found.
2021-04-26 16:21:52,884 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform java.lang.Object as its containing application archive could not be found.
2021-04-26 16:21:52,885 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform jdk.internal.HotSpotIntrinsicCandidate as its containing application archive could not be found.
2021-04-26 16:21:52,897 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform java.util.Map as its containing application archive could not be found.
2021-04-26 16:21:52,898 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform java.lang.SafeVarargs as its containing application archive could not be found.
2021-04-26 16:21:52,928 WARN  [io.qua.dep.ste.ClassTransformingBuildStep] (build-33) Cannot transform java.util.Collection as its containing application archive could not be found.
2021-04-26 16:21:55,075 INFO  [io.quarkus] (main) Quarkus 1.13.2.Final on JVM started in 3.428s. Listening on: http://localhost:8081
2021-04-26 16:21:55,076 INFO  [io.quarkus] (main) Profile test activated. 
2021-04-26 16:21:55,076 INFO  [io.quarkus] (main) Installed features: [cdi, config-yaml, hibernate-validator, jacoco, jaeger, kubernetes-client, logging-gelf, resteasy, resteasy-jackson, smallrye-openapi, smallrye-opentracing, swagger-ui]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.467 s - in org.acme.testcoverage.UtilTest
[INFO] Running org.acme.testcoverage.GreetingResourceTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.38 s - in org.acme.testcoverage.GreetingResourceTest
2021-04-26 16:21:57,005 INFO  [io.quarkus] (main) Quarkus stopped in 0.029s

Are the warnings valid (and thus I am misusing something)?
Is such a utility class to be avoided in CDI?
In our project, the warning is actually generated in non utility classes, as well.

To Reproduce

Steps to reproduce the behavior:

  1. git clone [email protected]:chris-asl/quarkus-jacoco-smallrye-openapi.git
  2. ./mvnw clean verify

Configuration

Defaults

Environment:

Output of uname -a or ver

Linux homer 5.8.0-48-generic #54~20.04.1-Ubuntu SMP Sat Mar 20 13:40:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Output of java -version

openjdk version "11.0.10" 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.10+9-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

Quarkus version or git rev

1.13.2.Final

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

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /home/chris/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 11.0.10, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.8.0-48-generic", arch: "amd64", family: "unix"

FYI @el10686

@chris-asl chris-asl added the kind/bug Something isn't working label Apr 26, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 26, 2021

/cc @geoand

@geoand
Copy link
Contributor

geoand commented Apr 26, 2021

Mind sharing a small reproducer?

Thanks

@geoand geoand added triage/needs-reproducer We are waiting for a reproducer. and removed area/kubernetes labels Apr 26, 2021
@chris-asl
Copy link
Contributor Author

@geoand I had posted a reproducer in the OP :-)
[email protected]:chris-asl/quarkus-jacoco-smallrye-openapi.git

Here's the link to the repository https://github.com/chris-asl/quarkus-jacoco-smallrye-openapi

@geoand geoand removed the triage/needs-reproducer We are waiting for a reproducer. label Apr 27, 2021
@geoand
Copy link
Contributor

geoand commented Apr 27, 2021

Thanks!

@phillip-kruger mind taking a look please?

@phillip-kruger
Copy link
Member

Public holiday today, I'll have a look tomorrow, except if @MikeEdgar wants to have a look today.

@geoand
Copy link
Contributor

geoand commented Apr 27, 2021

Thanks 👍

@phillip-kruger
Copy link
Member

@geoand @chris-asl I had a look at this. I am not sure what the issue is, or if it's an OpenAPI issue.

In the OpenAPI extension we add some classes to the index that is not typically there (see

void contributeClassesToIndex(BuildProducer<AdditionalIndexedClassesBuildItem> additionalIndexedClasses) {
)

That might cause the warnings, but the warning comes from somewhere else. Maybe @stuartwdouglas can help ?

@stuartwdouglas
Copy link
Member

Pretty sure this is fixed upstream: #16667

@stuartwdouglas
Copy link
Member

Hmm, actually that is a different issue: #16666 should be the fix for this one

@phillip-kruger
Copy link
Member

Thanks @stuartwdouglas . I'll confirm against upstream.

@phillip-kruger
Copy link
Member

Confirmed !! Thanks @stuartwdouglas . Fix and available in 1.13.3.Final

@geoand geoand added this to the 1.13.3.Final milestone Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants