Sean R. Owen created SPARK-36704:
------------------------------------

             Summary: InaccessibleObjectException in Java 9+ on startup
                 Key: SPARK-36704
                 URL: https://issues.apache.org/jira/browse/SPARK-36704
             Project: Spark
          Issue Type: Bug
          Components: Spark Core
    Affects Versions: 3.2.0
            Reporter: Sean R. Owen
            Assignee: Sean R. Owen


A user reported this error on startup, which must be Java9+-related given the 
Java-9+ exception:

{code}
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make 
private java.nio.DirectByteBuffer(long,int) accessible: module java.base does 
not "opens java.nio" to unnamed module @71e9ddb4
        at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:357)
        at 
java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
        at 
java.base/java.lang.reflect.Constructor.checkCanSetAccessible(Constructor.java:188)
        at 
java.base/java.lang.reflect.Constructor.setAccessible(Constructor.java:181)
        at org.apache.spark.unsafe.Platform.<clinit>(Platform.java:56)
{code}

Code in this section tries to open up some access to DirectBuffer by 
reflection, which no longer works by default in Java 9+. We long ago tried to 
handle this by dealing with the exception and avoiding reflection where not 
possible. However this seems like a possible new way the same type of issue can 
manifest.

We can shore up the code checking this to try to handle this apparent error 
path similarly.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to