Rewritten DialogException in Java to circumvent the IncompatibleClassChangeError