-
Notifications
You must be signed in to change notification settings - Fork 310
Description
Spring data cassandra version: 3.2.3
Hi, I have a case where I'm running a spring boot app with spring data while connecting to both an oracle and a cassandra instance. I noticed an error when testing a method that throws NoResultException, that instead of getting translated to an EmptyResultDataAccessException (like it did before I added spring data cassandra), it instead got translated to CassandraUncategorizedException. I think this is because org.springframework.data.cassandra.core.cql.CassandraExceptionTranslator returns CassandraUncategorizedException instead of null when the contract for PersistenceExceptionTranslator says
Do not translate exceptions that are not understood by this translator: for example, if coming from another persistence framework, or resulting from user code or otherwise unrelated to persistence.
Since the cassandra translator happens to get inserted first in line before the one for oracle hibernate no exceptions ever reach it and all persistence exceptions are now considered to be Cassandra exceptions.