List of usage examples for org.springframework.dao InvalidDataAccessResourceUsageException getRootCause
@Nullable
public Throwable getRootCause()
From source file:com.wavemaker.runtime.data.util.DataServiceUtils.java
public static RuntimeException unwrap(Throwable th) { th = SystemUtils.getRootException(th); if (InvalidDataAccessResourceUsageException.class.isAssignableFrom(th.getClass())) { InvalidDataAccessResourceUsageException e = (InvalidDataAccessResourceUsageException) th; if (e.getRootCause() != null) { th = e.getRootCause();/*from w w w.ja va 2 s . c om*/ } } if (SQLGrammarException.class.isAssignableFrom(th.getClass())) { SQLGrammarException s = (SQLGrammarException) th; if (s.getSQLException() != null) { th = s.getSQLException(); } else if (s.getCause() != null) { th = s.getCause(); } } if (th instanceof RuntimeException) { return (RuntimeException) th; } else { return new DataServiceRuntimeException(th); } }