[ https://issues.apache.org/jira/browse/SPARK-18022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15593005#comment-15593005 ]
Dongjoon Hyun commented on SPARK-18022: --------------------------------------- Hi, [~maver1ck]. Could you give us more information to reproduce this? Is the table created by Spark? Spark does not create INDEX or CONSTRAINT (primary key), does it? > java.lang.NullPointerException instead of real exception when saving DF to > MySQL > -------------------------------------------------------------------------------- > > Key: SPARK-18022 > URL: https://issues.apache.org/jira/browse/SPARK-18022 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 2.0.1 > Reporter: Maciej BryĆski > Priority: Minor > > Hi, > I have found following issue. > When there is an exception while saving dataframe to MySQL I'm unable to get > it. > Instead of I'm getting following stacktrace. > {code} > 16/10/20 06:00:35 WARN TaskSetManager: Lost task 56.0 in stage 10.0 (TID > 3753, dwh-hn28.adpilot.co): java.lang.NullPointerException: Cannot suppress a > null exception. > at java.lang.Throwable.addSuppressed(Throwable.java:1046) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$.savePartition(JdbcUtils.scala:256) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$saveTable$1.apply(JdbcUtils.scala:314) > at > org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonfun$saveTable$1.apply(JdbcUtils.scala:313) > at > org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$28.apply(RDD.scala:902) > at > org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$apply$28.apply(RDD.scala:902) > at > org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1916) > at > org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:1916) > at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:70) > at org.apache.spark.scheduler.Task.run(Task.scala:86) > at > org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:274) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > {code} > The real exception could be for example duplicate on primary key etc. > With this it's very difficult to debugging apps. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org