Thursday, June 18, 2015

Openxava 5.3 - minuteproject 0.9.3 - ehcache quick fix

Minuteproject 0.9.4- is not compatible with Openxava 5.3 regarding hibernate - ehcache integration.

Openxava hibernate dependency has been upgraded.
Hibernate now requires the property hibernate.cache.region.factory_class instead of hibernate.cache.provider_class
In the case of ehcache cache provider then the value is org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory

This situation prevents OX generated App to start.

Patch 1

Download Minuteproject 0.9.5 to disable minuteproject 4 openxava ehcache wiring.
Add this property

< property name="openxava-disable-sdd" value="true" />

Patch 2

So the fix to apply in the generated code is to patch the generated persistence.xml with

< property name="hibernate.cache.region.factory_class" 
value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" />

Meanwhile it is not enough since now hibernate core do not bundle the cache package.
The package is now in the archive


Disable the openxava ehcache hibernate config by removing the hibernate properties related to cache in persistence.xml


In next release minuteproject will come with the property to disable openxava-hibernate-cache.