You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Maciej Bryński (JIRA)" <ji...@apache.org> on 2016/10/20 06:06:58 UTC
[jira] [Created] (SPARK-18022) java.lang.NullPointerException
instead of real exception when saving DF to MySQL
Maciej Bryński created SPARK-18022:
--------------------------------------
Summary: 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org