Replies: 4 comments 1 reply
-
/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel,native-image) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @dhoffer, put together a small program, preferably a Quarkus maven project we can take a look at, please. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That probably won't be possible, the small program probably won't have this
issue. I can say that this particular app has several dependencies and the
classes that it can't find come from one of those dependencies. Yes, all
of our dependencies have an empty beans.xml file andor a Jandex index
file. Everything works as expected when run with the JVM. Also all have
@RegisterForReflection.
…On Tue, Aug 6, 2024 at 8:21 AM Karm Michal Babacek ***@***.***> wrote:
Hello @dhoffer <https://github.com/dhoffer>, put together a small
program, preferably a Quarkus maven project we can take a look at, please.
—
Reply to this email directly, view it on GitHub
<#42339 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL7BL3M4DOSSMVMV65JEZDZQDLXTAVCNFSM6AAAAABMCH64H6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRVGQ2TIMI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
I'll see if I can recreate with a new simple app.
…On Tue, Aug 6, 2024 at 9:16 AM Karm Michal Babacek ***@***.***> wrote:
@dhoffer <https://github.com/dhoffer> I wouldn't go as far as call it an
issue. You are trying to do something that must have a specific config in
the context of Native image. If you preapre a small Quarkus project that
tries to do what you'd like, on an arbitrary class from an arbitrary third
party dependency, I will take a look and make it work or explain why it
doesn't. It could by your own artificial one, dhoffer.hello.world.MyClass.
Without having something to look at, we are going to burn a lot of time
trying to understand each other...
—
Reply to this email directly, view it on GitHub
<#42339 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAL7BLYWLWTYDIT6MENWRV3ZQDSFDAVCNFSM6AAAAABMCH64H6VHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTAMRVGUYTKNY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We have Java code that needs to find classes from a specified package name and then read their annotations. We have tried this using org.reflections, Guava's ClassLoader & with the JDK's Thread.currentThread().getContextClassLoader() approach and all three of these work when run on the JVM.
However when we compile the same application as a native Quarkus app using GraalVM or Mandrel all three approaches do not work, none of the classes are found that exist in the specified package name.
We have added the @RegisterForReflection annotations on all the classes we expect to find in this package.
How can I get this to work in a native GraalVM or Mandrel application? Note I am currently building the native for Windows.
We have tried this using org.reflections, Guava's ClassLoader & with the JDK's Thread.currentThread().getContextClassLoader() approach and we expect any of these should allow us to find classes that have a certain package name. All these work when run on the JVM but none work when the app is natively compiled by GraalVM or Mandrel.
Beta Was this translation helpful? Give feedback.
All reactions