Fixes #86699 by handling the GenericJDBC exception