From issues-return-135202-apmail-spark-issues-archive=spark.apache.org@spark.apache.org Thu Oct 20 06:06:59 2016 Return-Path: X-Original-To: apmail-spark-issues-archive@minotaur.apache.org Delivered-To: apmail-spark-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EE4F19E2C for ; Thu, 20 Oct 2016 06:06:59 +0000 (UTC) Received: (qmail 11999 invoked by uid 500); 20 Oct 2016 06:06:59 -0000 Delivered-To: apmail-spark-issues-archive@spark.apache.org Received: (qmail 11968 invoked by uid 500); 20 Oct 2016 06:06:59 -0000 Mailing-List: contact issues-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@spark.apache.org Received: (qmail 11959 invoked by uid 99); 20 Oct 2016 06:06:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Oct 2016 06:06:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D9F492C0073 for ; Thu, 20 Oct 2016 06:06:58 +0000 (UTC) Date: Thu, 20 Oct 2016 06:06:58 +0000 (UTC) From: =?utf-8?Q?Maciej_Bry=C5=84ski_=28JIRA=29?= To: issues@spark.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (SPARK-18022) java.lang.NullPointerException instead of real exception when saving DF to MySQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Maciej Bry=C5=84ski created SPARK-18022: -------------------------------------- Summary: java.lang.NullPointerException instead of real except= ion 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=C5=84ski Priority: Minor Hi, I have found following issue. When there is an exception while saving dataframe to MySQL I'm unable to ge= t 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 37= 53, 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$.saveP= artition(JdbcUtils.scala:256) at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonf= un$saveTable$1.apply(JdbcUtils.scala:314) at org.apache.spark.sql.execution.datasources.jdbc.JdbcUtils$$anonf= un$saveTable$1.apply(JdbcUtils.scala:313) at org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$ap= ply$28.apply(RDD.scala:902) at org.apache.spark.rdd.RDD$$anonfun$foreachPartition$1$$anonfun$ap= ply$28.apply(RDD.scala:902) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkConte= xt.scala:1916) at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkConte= xt.scala:1916) at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:7= 0) 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(ThreadPoolExec= utor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe= cutor.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