Index: ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java =================================================================== --- ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (revision 1237763) +++ ql/src/java/org/apache/hadoop/hive/ql/exec/Utilities.java (working copy) @@ -397,6 +397,13 @@ } } + private static final ExceptionListener FAIL_EXCEPTION_LISTENER = new ExceptionListener() { + @Override + public void exceptionThrown(Exception exception) { + throw new RuntimeException("XML decode failed", exception); + } + }; + public static ExprNodeDesc deserializeExpression(String s, Configuration conf) { byte[] bytes; try { @@ -407,7 +414,7 @@ ByteArrayInputStream bais = new ByteArrayInputStream(bytes); - XMLDecoder decoder = new XMLDecoder(bais, null, null); + XMLDecoder decoder = new XMLDecoder(bais, null, FAIL_EXCEPTION_LISTENER); try { ExprNodeDesc expr = (ExprNodeDesc) decoder.readObject(); return expr; @@ -480,7 +487,7 @@ public static QueryPlan deserializeQueryPlan(InputStream in, Configuration conf) { XMLDecoder d = null; try { - d = new XMLDecoder(in, null, null); + d = new XMLDecoder(in, null, FAIL_EXCEPTION_LISTENER); QueryPlan ret = (QueryPlan) d.readObject(); return (ret); } finally { @@ -513,7 +520,7 @@ public static MapredWork deserializeMapRedWork(InputStream in, Configuration conf) { XMLDecoder d = null; try { - d = new XMLDecoder(in, null, null); + d = new XMLDecoder(in, null, FAIL_EXCEPTION_LISTENER); MapredWork ret = (MapredWork) d.readObject(); return (ret); } finally { @@ -545,7 +552,7 @@ public static MapredLocalWork deserializeMapRedLocalWork(InputStream in, Configuration conf) { XMLDecoder d = null; try { - d = new XMLDecoder(in, null, null); + d = new XMLDecoder(in, null, FAIL_EXCEPTION_LISTENER); MapredLocalWork ret = (MapredLocalWork) d.readObject(); return (ret); } finally {