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

com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectInputStream.readObject() #626

Closed
phamvanthanh opened this issue May 27, 2020 · 4 comments

Comments

@phamvanthanh
Copy link

Hi
Does this mean Graalvm implementation or configuration?

This happened at run time
Os Windows 10
Graalvm 20.2.0

com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectInputStream.readObject()

Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javafx.reflect.Trampoline.invoke(MethodUtil.java:76)
at java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.javafx.reflect.MethodUtil.invoke(MethodUtil.java:273)
at com.sun.javafx.fxml.MethodHelper.invoke(MethodHelper.java:83)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1786)
... 32 more
Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: ObjectInputStream.readObject()
at com.oracle.svm.core.util.VMError.unsupportedFeature(VMError.java:86)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:53)

@mipastgt
Copy link

GraalVM/native-image currently does not support any kind of Java serialization. See: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md#serialization

I recently stumbled of the the same problem and had to find another serialization mechanism which of course is not possible if you do not have control over the relevant piece of software.

@phamvanthanh
Copy link
Author

phamvanthanh commented May 30, 2020

@mipastgt
Thanks for your sharing. I though about XML or Json but It would be quite a lot of changes and the problem of arbitrary access to any cluster of database would be harder.

I am a little confused about replacement of Serialization mechanism or continue supporting in GraalVM as works of this seems to be in progress oracle/graal#2323

@mipastgt
Copy link

Well, this is 'in progrees' already for two years :-( As a quick and dirty solution I used Jackson because I needed a working solution now but in the long run I am planning to use Googles protocol buffers but have not tried that yet. I hope I do not stumble into the same isssues there. At least Jackson worked for me so far.

@jperedadnr
Copy link
Contributor

Serialization is supported by GraalVM. Running mvn gluonfx:runagent should create the required configuration files.

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

3 participants