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

[GraalVM 21.3.0.r17] Optaplanner Native Build Failure #992 #993

Closed
Tracked by #21481
cescoffier opened this issue Nov 15, 2021 · 4 comments · Fixed by quarkusio/quarkus#22005
Closed
Tracked by #21481

[GraalVM 21.3.0.r17] Optaplanner Native Build Failure #992 #993

cescoffier opened this issue Nov 15, 2021 · 4 comments · Fixed by quarkusio/quarkus#22005
Labels
bug Something isn't working

Comments

@cescoffier
Copy link
Member

When using the JAva 17 support of GraalVM 21.3.0, the optaplanner quickstart fails with:

Error: Class initialization of com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter$Reflections failed. Use the option --initialize-at-run-time=com.thoughtworks.xstream.converters.reflection.AbstractAttributedCharacterIteratorAttributeConverter$Reflections to explicitly request delayed initialization of this class.
@ffang
Copy link

ffang commented Nov 24, 2021

Hi @cescoffier ,

We see this problem also in camel-quarkus. We can specify quarkus.native.additional-build-args
-J--add-opens=java.base/java.text=ALL-UNNAMED to workaround it in camel-quarkus. Or this flag will be added in quarkus NativeImageBuildStep.java by default(like the fix for quarkusio/quarkus#21359)? Though the root cause is that the com.thoughtworks.xstream should avoid using "non-public deep reflect".

Best Regards
Freeman

@cescoffier
Copy link
Member Author

@ffang that's interesting. Adding that to the extension, or declaring a build item could be interesting.
@Sanne, you did it explicitly. Do you think a build item can be useful?

@Sanne
Copy link
Member

Sanne commented Nov 25, 2021

@cescoffier no I don't think a build item would be useful. I did consider it, but there is no drawback in including the missing modules: it's only about visibility, it's not enforcing their inclusion.

So it's actually better to have a hard-coded list in core (feel free to add this one) than to have to test/validate multiple permutations of such flags.

@ffang
Copy link

ffang commented Dec 7, 2021

PR sent to address this
quarkusio/quarkus#22005

Thanks @Sanne @cescoffier !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants