-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Multipart Class Defined Outside Resource Implementation Fails with CNFE "Populator" #19037
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
@michalszynkiewicz let me know if you need anything from me on this one |
The weird thing is, the class is there, generated. |
It is likely ending up in the wrong ClassLoader, which is determined by |
So, it is set to be an application class. |
@geoand if you could take a look at it, I'd be grateful :) |
I'll have a look tomorrow |
The reason this works in dev-mode and not in test-mode is that dev-mode includes the classes of the dependent @aloubyansky @stuartwdouglas is there a good reason why we have this difference? If the current behavior is something we do want to maintain, I can work around it |
#19068 is the fix for the current state of afairs |
Fixes quarkusio#19037 (cherry picked from commit c09a500)
Describe the bug
When I define a class meant to be used as a payload in both my REST client and resource I get a CNFE stating that the "populator" could not be located. If I put the class with the resource it works fine.
Referencing a conversation with Michal on Google Groups.
Issue 1 demonstrates the error / Working 2 demonstrates what worked:
reproduce-issue1.zip
reproduce-working2.zip
NOTE: Hopefully I did not mix up my reproducers.
Expected behavior
Class defined in a separate module can be used as the payload from the client and in the resource.
Actual behavior
Class not found exception - "Populator" when the payload is defined in another module.
ClassNotFoundException: io.platform.api.publish.FilePackage_generated_populator
How to Reproduce?
Run
mvn clean install
on the issue attached aboveOutput of
uname -a
orver
Ubuntu / WSL
Output of
java -version
JDK 11 in the POM / 15 as the default.
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.0.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)3.8.1
Additional information
I forgot to include the Jandex plugin in my reproducer but my modules all are invoking it (and I see the IDX file). I have also tried adding a
beans.xml
but that did not help. Anything but the multipart payload seems to work though when separated between an API jar and the service jar.The text was updated successfully, but these errors were encountered: