diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java index cb227d0c20..d0db9689f6 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/SharedSessionContractImplementor.java @@ -189,7 +189,7 @@ public interface SharedSessionContractImplementor */ default void checkTransactionNeededForUpdateOperation(String exceptionMessage) { if ( !isTransactionInProgress() ) { - throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) ); + throw new TransactionRequiredException( exceptionMessage ); } } diff --git a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java index a4b6a5c1f1..ee523b802d 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/AbstractSharedSessionContract.java @@ -395,7 +395,7 @@ public abstract class AbstractSharedSessionContract implements SharedSessionCont @Override public void checkTransactionNeededForUpdateOperation(String exceptionMessage) { if ( disallowOutOfTransactionUpdateOperations && !isTransactionInProgress() ) { - throw getExceptionConverter().convert( new TransactionRequiredException( exceptionMessage ) ); + throw new TransactionRequiredException( exceptionMessage ); } }