From a70d40314c7706c138520192cb3cf33b78d5b504 Mon Sep 17 00:00:00 2001 From: Josh Rosen Date: Thu, 21 Apr 2016 10:43:22 -0700 Subject: [SPARK-14783] Preserve full exception stacktrace in IsolatedClientLoader In IsolatedClientLoader, we have a`catch` block which throws an exception without wrapping the original exception, causing the full exception stacktrace and any nested exceptions to be lost. This patch fixes this, improving the usefulness of classloading error messages. Author: Josh Rosen Closes #12548 from JoshRosen/improve-logging-for-hive-classloader-issues. --- .../scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala index 1d502e01d9..7e0d1b446f 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala @@ -263,7 +263,7 @@ private[hive] class IsolatedClientLoader( throw new ClassNotFoundException( s"$cnf when creating Hive client using classpath: ${execJars.mkString(", ")}\n" + "Please make sure that jars for your version of hive and hadoop are included in the " + - s"paths passed to ${HiveContext.HIVE_METASTORE_JARS}.") + s"paths passed to ${HiveContext.HIVE_METASTORE_JARS}.", e) } else { throw e } -- cgit v1.2.3