You can't use the local-tx-datasource because it will inherit the transaction from the ejb context.
In the stacktrace you show, the jta tranaction has already been aborted so it can't log
(write things into the database).
Even If it wasn't already aborted, a subsequent rollback of the transaction would mean
nothing gets logged.
Also, you certainly can't set auto commit to false on a transactional
datasource that is enlisted in a transaction like you have.