graal
graal copied to clipboard
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: ai.onnxruntime.OrtSession$SessionOptions
============= win10 , java21
I used GraalVM 21 to package my project, which introduced the onnxruntime jar.
<plugin>
<groupId>org. galalvm. buildtools</groupId>
<artifactId>native aven plugin</artifactId>
<configuration>
<buildArgs>
<arg>- H:+AllowDeprecatedBuilderClassesOnImageClasspath</arg>
</buildArgs>
</configuration>
</plugin>
After successful packaging, run exe with an exception: Caused by: Java. lang. RuntimeException: Java. lang. NoClassDefFoundError: ai. onnxruntime OrtSession $SessionOptions.
======================
If commented out:
How should I handle it, may I ask? thanks!
Hi. To understand the issue, please provide the following information:
- The exact version of GraalVM, that will be the full output of
java -version
- A minimal reproducer that we can use to get the same error locally.
- The steps you followed to get this error.
Just setup your reflection.json config will fix the issue