-
1. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
simkam Sep 5, 2018 7:25 AM (in response to sergiu_pienar)Hi,
could you please provide example of bean (or at least method) that throws this exception?
Thanks
-
2. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
sergiu_pienar Sep 5, 2018 7:57 AM (in response to simkam)@TransactionAttribute(TransactionAttributeType.REQUIRED) @RolesAllowed({ "PROCESS_C", "INTERNAL_SYSTEM" }) public void insert(final Long clientId, final Process p) throws Exception { try { Session sess = hsf.openSession(); sess.save(bean); sess.flush(); return bean; } catch (Exception e) { ProcessBean.LOGGER.error("Error inserting Process entry for client: " + clientId, e); throw new EJBException("Error inserting Process entry for client: " + clientId, e); } }
Where hsf is the SessionFactory that results after a call like this:
Configuration cfg = new Configuration(); SessionFactory sf = cfg.buildSessionFactory();
-
3. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
ctomc Sep 5, 2018 8:03 AM (in response to sergiu_pienar)what does your deployment look like?
can you paste list of the jars in your lib
-
4. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
sergiu_pienar Sep 5, 2018 8:33 AM (in response to ctomc)The deployment is an EAR with a lib and META-INF folder inside plus 3 war's a jar holding the EJBs and 4 resource adapters.
I can paste the list of jars deployed in the lib folder, if needed, but as I initially mentioned all this was working with the previous version of WildFly and hibernate.
-
5. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
simkam Sep 5, 2018 8:50 AM (in response to sergiu_pienar)1 of 1 people found this helpfulI believe it is this
"""
Hibernate now conforms with the JPA specification to not allow flushing updates outside of a transaction boundary. To restore 5.1 behavior, allowing flush operations outside of a transaction boundary, set
hibernate.allow_update_outside_transaction=true
."""
from Hibernate ORM 5.2 migration guide.
-
6. Re: WildFly 14 + Hibernate 5.3.6 - no transaction is in progress
sergiu_pienar Sep 5, 2018 9:17 AM (in response to simkam)That was it, Martin. Thank you !