[WFLY-490] Fix the exception type