[jboss-jira] [JBoss JIRA] (WFLY-11543) EJB transactional method unable to commit when invoked from CDI bean with MariaDB

Marc Anthony Puca (Jira) issues at jboss.org
Thu Dec 20 17:02:00 EST 2018


    [ https://issues.jboss.org/browse/WFLY-11543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13676934#comment-13676934 ] 

Marc Anthony Puca commented on WFLY-11543:
------------------------------------------

Added the server.log with trace for org.wildfly.transaction.client, com.arjuna and org.jboss.as.txn when the issue occurs logs.zip contains 2 files once for each scenario

> EJB transactional method unable to commit when invoked from CDI bean with MariaDB
> ---------------------------------------------------------------------------------
>
>                 Key: WFLY-11543
>                 URL: https://issues.jboss.org/browse/WFLY-11543
>             Project: WildFly
>          Issue Type: Bug
>          Components: JPA / Hibernate
>    Affects Versions: 15.0.0.Final
>         Environment: WildFly 15.0.0.Final
> MariaDB 10.1.19
>            Reporter: Michal Jurc
>            Assignee: Scott Marlow
>            Priority: Blocker
>         Attachments: logs.zip, server-trace.zip
>
>
> Issue cloned from the [community forum|https://developer.jboss.org/thread/279303] for tracking.
> {quote}Hello,
>  
> We are having issues after deploying our application in the latest Wildfly 15.0.0 Final recently released with the following exception:
>      java.sql.SQLException: XAER_RMFAIL: The command cannot be executed when global transaction is in the  IDLE state
>  
> The error occurs when our code calls a transactional EJB method that itself calls a couple more injected SessionBean that handles the database persistence through an EntityManager
> The issue only seems to affect the MariaDB port and not oracle.{quote}
> {quote}I have hit the same problem, migrated from Wildfly 10.0.0. to 15.0.0, using MySQL, same error, similar situation, cdi managed bean that invokes 2 EJBs that use different persistent units. I dont seem to have the problem in 14.0.1 either.
>  
> Another error that has surfaced is this (apologies for the weird formatting but struggled to define a simple type-up without cluttering)
>  
> "javax.persistence.TransactionRequiredException: no transaction is in progress"
> Managed bean with injected ejb (with datasource2) and injected entitymanager for datasource1, code is nested as follows
>  
> Managed bean method save @Transactional(value = TxType.REQUIRED)
> {
>           ejb save  @TransactionAttribute(TransactionAttributeType.MANDATORY)
>           {
>                          persist
>                          flush
>           }
>  
>           find with lock => LockModeType.PESSIMISTIC_WRITE        at this point the "no transaction is in progress" exception is fired 
>  
> }
>                              
> Did notice that error does not occur if the invocation is purely ejb rather that cdi managed bean                     {quote}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list