I am using Hibernate and Atomikos for JTA for one of my proof of concepts. I am getting a JTA transaction unexpectedly rollback exception, maybe due to a timeout. The exception is:
javax.transaction.RollbackException: Prepare: NO vote
I am using Hibernate and Atomikos for JTA for one of my proof of concepts. I am getting a JTA transaction unexpectedly rollback exception, maybe due to a timeout. The exception is:
javax.transaction.RollbackException: Prepare: NO vote
This error occurs if a transaction is requested to commit but has already been rolled back due to a timeout. So your assumption is totally right. The solution is to increase the transaction timeout.
You can increase the timeout for a transaction using spring configurations, for e.g. by declaring transactional.properties file with value,
com.atomikos.icatch.max_actives=100
com.atomikos.icatch.log_base_name=atomikos-log
com.atomikos.icatch.log_base_dir=transaction-logs-dir/
com.atomikos.icatch.registered=true
com.atomikos.icatch.default_jta_timeout=10000
com.atomikos.icatch.max_timeout=20000