question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multipart Class Defined Outside Resource Implementation Fails with CNFE "Populator"

See original GitHub issue

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 above

Output of uname -a or ver

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 or gradlew --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.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
geoandcommented, Jul 28, 2021

I’ll have a look tomorrow

0reactions
geoandcommented, Jul 28, 2021

https://github.com/quarkusio/quarkus/pull/19068 is the fix for the current state of afairs

Read more comments on GitHub >

github_iconTop Results From Across the Web

chore(deps): update dependency io.quarkus:quarkus ... - GitLab
An error occurred while retrieving approval data for this merge request. chore(deps): update dependency io.quarkus:quarkus ...
Read more >
users@jersey.java.net: by author - Oracle
FormDataMultiPart, and Java type class com.sun.jersey.multipart. ... Re: [Jersey] Very Large files causing java Out of Memory error (Wed Mar 11 02:21:50 ...
Read more >
quarkusio/quarkus 2.1.1.Final on GitHub - NewReleases.io
... #19037 - Multipart Class Defined Outside Resource Implementation Fails with CNFE "Populator"; #19032 - Register for reflection some log4j classes used ...
Read more >
Apache Tomcat 6.0 (6.0.53) - Changelog
Implement socket.unlockTimeout attribute for NIO connector. Update version of native bundled in Windows installer to 1.1.18. (kkolinko).
Read more >
more java pitfalls. 50 new time - The Swiss Bay
The formal definition, given in the first Java Pitfalls (Wiley, 2000) book, ... Item 31), and shock when implementations fail to meet your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found