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 native image support #144

Open
smiera opened this issue Nov 17, 2021 · 0 comments
Open

GraalVM native image support #144

smiera opened this issue Nov 17, 2021 · 0 comments

Comments

@smiera
Copy link

smiera commented Nov 17, 2021

Hi,

Using GraalVM native image build can speedup almost any Java application and use less memory.

I try to build native image from project that use jnr-fuse and get errors at runtime

Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: No classes have been predefined during the image build to load from bytecodes at runtime.
	at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:87)
	at com.oracle.svm.core.hub.PredefinedClassesSupport.throwNoBytecodeClasses(PredefinedClassesSupport.java:76)
	at com.oracle.svm.core.hub.PredefinedClassesSupport.loadClass(PredefinedClassesSupport.java:130)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:263)
	at jnr.ffi.provider.jffi.AsmClassLoader.defineClass(AsmClassLoader.java:36)
	at jnr.ffi.provider.jffi.AsmStructByReferenceFromNativeConverter.newStructByReferenceClass(AsmStructByReferenceFromNativeConverter.java:170) 

How I understand, JNR create classes at runtime. And this is problem for native image.

So the question is: can you prepare library for native image build or pre-generate classes for GraalVM agentlib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant