- 
        Couldn't load subscription status. 
- Fork 38.8k
Description
Igor Mihalik opened SPR-10068 and commented
Transaction "RollbackOnly" problem occurs when using EclipseLink (any version up to 2.5.0-M5) together with Spring ORM and "timeout" attribute on @Transactional in case of "delete" query.
EntityManagerFactoryUtil class in method "applyTransactionTimeout" sets a hint "javax.persistence.lock.timeout". However EclipseLink throws back an exception:
java.lang.IllegalArgumentException: Query delete from [*], query hint javax.persistence.lock.timeout is not valid for this type of query.
Moreover EclipseLink sets RollbackOnly on current transaction and doCommit throws: Exception in thread "main" org.springframework.transaction.TransactionSystemException: Could not commit JPA transaction; nested exception is javax.persistence.RollbackException: Transaction rolled back because transaction was set to RollbackOnly.
Attached is a simple project to demonstrate the problem.
Affects: 3.1.3
Attachments:
- elink_problem.tar.gz (2.11 kB)
Backported to: 3.1.4