Error Class 2D: Invalid Transaction Termination

Error Class 2D: Invalid Transaction Termination
SQLSTATE Message Text
2D521.S.1 setAutoCommit(true) invalid during global transaction.
2D521.S.2 COMMIT or ROLLBACK invalid for application execution environment.