Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-49480

NullPointerException from SparkThrowableHelper.isInternalError method

    XMLWordPrintableJSON

Details

    Description

      The SparkThrowableHelper.isInternalError method doesn't handle null input, and it could lead to NullPointerException.

      Example stacktrace from our environment with Spark 3.5.1:

       Caused by: java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "errorClass" is null
          at org.apache.spark.SparkThrowableHelper$.isInternalError(SparkThrowableHelper.scala:64)
          at org.apache.spark.SparkThrowableHelper.isInternalError(SparkThrowableHelper.scala)
          at org.apache.spark.SparkThrowable.isInternalError(SparkThrowable.java:50)
          at org.apache.spark.SparkException.isInternalError(SparkException.scala:27)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:568)
          at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:688)
          at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:772)
          ... 30 more  

      Attachments

        Issue Links

          Activity

            People

              jshmchenxi Xi Chen
              jshmchenxi Xi Chen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: