Guava contains the very useful class Throwables, which has the very useful method getRootCause. Given an exception, this method will return the original cause by following the cause hierarchy until it finds the first exception which has no underlying cause. For example: try { throw new IOException(new IllegalArgumentException(new NumberFormatException("Foo"))); } catch (Exception e) { assertTrue(Throwables.getRootCause(e) instanceof NumberFormatException); } If the given exception has no caus...