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
Mongo: Class Not Found jnr.unixsocket.UnixSocket when running in Native #15434
Comments
/cc @evanchooly, @loicmathieu |
It's very difficult to try to understand what's going on as the provided stacktrace didn'g give any stack inside Quarkus nor MongoDB. Can you try to locate which extension have the Can you also try to remove the Lastly, you can try to add the missing class and see if it fixes the issue, if yes, we can add it from the MongoDB client extension. You can use an empty class annotated with `@RegisterForReflection(targets={jnr.unixsocket.UnixSocket.class}) this would do the trick. |
I didn't try your last suggestions, but if I understood correctly, are you going then add this dependency as part of the MongoDB client extension as a fix? |
This library is used only in the I have no idea why it causes a native build issue, but this has something to do with the Quarkus extension processor. |
@aloubyansky the Quarkus extension processor have a transitive test dependency on |
It appears it's not a new issue. See oracle/graal#1239
And if you look into
|
It looks like |
So, are you suggesting that we should use |
@Sgitario as a workaround you can include the jnr library or add the I will work on a substitution to fix the issue, I don't want to always include this dependency. |
Trying to build the native application locally I have the following stacktrace:
|
I also faced the same exception and realised that there is an existing issue for this: #6327 |
@aloubyansky the class
Something else happens ... |
Which PR are you talking about @loicmathieu ? |
This one: #14609 |
It doesn't look like it's affecting the mongodb client extension though. |
No but the issue is not with the mongodb client extension alone but when it is integrated with other extensions |
Are you saying not every Quarkus application with the mongodb client extension will fail in this way? |
No, in fact it's the only one I'm aware of, and this particular one is using almost all exiting Quarkus applicaiton. So the issue may only occurs when some other extension is used with Quarkus. |
Oh, it's that tricky... |
I read it as the mongodb-client was the only extension included |
Oh no, the context was that both mongodb-client and mongodb-panache was included so I ask to test with only the client to see if it only occurs with it. |
I was trying to build it with my locally installed GraalVM and got a different error
Is that a known one? |
Could you please try adding |
@aloubyansky try it, no more info. |
This looks like the same issue with #16139 |
Yep, removing all the AWS extensions fixes this issue. However, I think this issue should remain opened and once the another issue related to AWS is solved, I can try again with Mongo. |
@Sgitario apparently the fix on AWS SDK has been integrated in Quarkus 1.13.5.Final. |
The fix was done on AWS SDK which has been integrated in Quarkus 1.13.5.Final and later. quarkusio/quarkus#15434
I've confirmed that this is indeed fixed. Thanks a lot! |
The fix was done on AWS SDK which has been integrated in Quarkus 1.13.5.Final and later. quarkusio/quarkus#15434
The fix was done on AWS SDK which has been integrated in Quarkus 1.13.5.Final and later. quarkusio/quarkus#15434
Describe the bug
We have a project that uses a lot of Quarkus extensions at the same time. One of these extensions is Mongo Panache and seems to be an incompatibility because when compiling the project in JVM, it works, but not in Native with the following error:
Note that when using only Mongo Panache, it works fine. I could not identify what other extension is causing Mongo to fail with this missing class.
Expected behavior
The project should work fine regardless the number of Quarkus extensions we're using.
Actual behavior
It fails to compile, see exception above.
To Reproduce
1- git clone https://github.com/Sgitario/beefy-scenarios
2- git checkout reproducer_15434
3- cd beefy-scenarios/002-quarkus-all-extensions
4- mvn clean verify -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:21.0.0-java11 -Dnative -Dquarkus.native.container-build=true (it needs to have built quarkus master locally)
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: