diff --git metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java index 2fc487f..e46b50d 100644 --- metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java +++ metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java @@ -200,9 +200,9 @@ public Result invokeInternal(final Object proxy, final Method method, final Obje if (retryCount >= retryLimit) { LOG.error("HMSHandler Fatal error: " + ExceptionUtils.getStackTrace(caughtException)); - // Since returning exceptions with a nested "cause" can be a problem in - // Thrift, we are stuffing the stack trace into the message itself. - throw new MetaException(ExceptionUtils.getStackTrace(caughtException)); + MetaException me = new MetaException(caughtException.getMessage()); + me.initCause(caughtException); + throw me; } assert (retryInterval >= 0);