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
XLST causes the executable to crash at runtime #3811
Comments
Hi @andirady. Thanks for reporting the issue. I will take a closer look into it and get back to you. |
@andirady, I have reported this issue with the native-image team. They will respond you accordingly. |
This issue has been fixed but we are waiting for the backports to JDK 11 and JDK 17: https://bugs.openjdk.java.net/browse/JDK-8273278 After this is merged, XSLT will be fully supported, however, it needs to use class pre-difinition for XSLT templates: one needs an agent run to collect all the generated template-processing classes. |
First off, this appears to be an issue of xsltc which is the default https://github.com/jerboaa/demo-xslt-native Interpretive xalan works with native-image. xsltc based transforms don't because of a) non-determinism of generated bytecode of classes b) generated classes don't get picked up out of the box (even when run with the agent). In my experiments the OpenJDK fix (JDK 17 or proposed JDK 11) alone doesn't work. For example a patched OpenJDK 11+graal vm build via mandrel results in:
This yields me to believe that some extra steps for telling graal vm where to find generated classes needs to happen. Thoughts? |
@jovanstevanovic Thanks. I've updated the demo with the patch. It "seems" to work for the unpatched xsltc reproducer (with upstream xalan). But that seems pure luck. |
It looks like the |
This seems to be related to our |
Hey @jerboaa, some good news! @ivan-ristovic's PR with this small patch makes it work. Try again, and let me know if something shows up. 😄 |
Describe the issue
The following XLST doesn't work at runtime after compiled with native-image but works in JVM.
The problematic code portion is as follows:
Steps to reproduce the issue
Please include both build steps as well as run steps
cd
into the extracted directorymake xmlformatter
./xmlformatter test.xml
Describe GraalVM and your environment:
More details
The text was updated successfully, but these errors were encountered: