Commit 26050ed
fix(java17): add java.lang.invoke module opens for Kryo serialization
Add --add-opens=java.base/java.lang.invoke=ALL-UNNAMED to test JVM options
to fix InaccessibleObjectException with Kryo serialization under Java 17.
This resolves the following error:
```
java.lang.reflect.InaccessibleObjectException: Unable to make field
private final java.lang.Class java.lang.invoke.SerializedLambda.capturingClass
accessible: module java.base does not "opens java.lang.invoke" to unnamed module
```
The Java Platform Module System (JPMS) in Java 9+ restricts reflective access
to internal JDK classes. Spark's Kryo serializer needs reflective access to
SerializedLambda for serializing closures.
Tested locally: all 37 GKMErrorSuite tests now pass.
Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 0dbfc69 commit 26050ed
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
0 commit comments