From a938d5838c2d01e43376571c0c0b6f0bce7dc74f Mon Sep 17 00:00:00 2001 From: Gail Badner Date: Sun, 24 Feb 2019 17:01:05 -0800 Subject: [PATCH] HHH-13262 - javax.persistence.TransactionRequiredException: Executing an update/delete query --- .../hibernate/engine/spi/SharedSessionContractImplementor.java | 2 +- .../org/hibernate/internal/AbstractSharedSessionContract.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ); } }