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

sjm fails with Graal (Java17) #394

Closed
chrishpowell opened this issue May 13, 2022 · 3 comments
Closed

sjm fails with Graal (Java17) #394

chrishpowell opened this issue May 13, 2022 · 3 comments

Comments

@chrishpowell
Copy link

sjm fails using Graal (Java 17) with

Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.simplejavamail.internal.clisupport.serialization.SerializationUtil.initKryo(SerializationUtil.java:43)
	at org.simplejavamail.internal.clisupport.serialization.SerializationUtil.<clinit>(SerializationUtil.java:36)
	at org.simplejavamail.internal.clisupport.CliSupport.produceCliDeclaredOptionSpec(CliSupport.java:57)
	at org.simplejavamail.internal.clisupport.CliSupport.<clinit>(CliSupport.java:47)
	at org.simplejavamail.cli.SimpleJavaMail.main(SimpleJavaMail.java:31)
Caused by: java.lang.RuntimeException: Could not access source collection field in java.util.Collections$UnmodifiableCollection.
	at de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer.<clinit>(UnmodifiableCollectionsSerializer.java:62)
	... 5 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field final java.util.Collection java.util.Collections$UnmodifiableCollection.c accessible: module java.base does not "opens java.util" to unnamed module @7e9a5fbe
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
	at de.javakaffee.kryoserializers.UnmodifiableCollectionsSerializer.<clinit>(UnmodifiableCollectionsSerializer.java:55)
	... 5 more

sjm works fine with Java 11.

@bbottema
Copy link
Owner

Hmm, sounds more like an issue with Kryo in Graal. Not sure what I can do about this, unfortunately.

@chrishpowell
Copy link
Author

It seems like this won't get fixed until Kryo v6: EsotericSoftware/kryo#885

@bbottema
Copy link
Owner

Well, there's nothing I can do here it seems. Closing until I can do more.

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

No branches or pull requests

2 participants