"Requesting TRANSACTIONAL cache concurrency strategy but the cache is not configured as transactional" in Hibernate 5

Solution Verified - Updated

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP) 7
  • Hibernate 5
    • Legacy (non-JPA) Hibernate application

Issue

  • Migrating a legacy (non-JPA) Hibernate application from EAP 6 / Hibernate 4 to EAP 7 / Hibernate 5

  • Logs include entries like the following

    Requesting TRANSACTIONAL cache concurrency strategy but the cache is not configured as transactional.
    

Resolution

This is a known defect Content from issues.jboss.org is not included.JBEAP-13724 which is resolved in EAP 7.1 CP1 and later.

Root Cause

The region templates provided in standalone*.xml or domain.xml were not being used by Hibernate when instantiating cache regions for legacy (non-JPA) applications were deployed. A default (non-transactional) cache configuration was used instead.

Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.