More information to this problem. The exception is thrown when using JBPM's hibernate configuration file (I call it hibernate-jbpm.cfg.xml) where there is no cache configuration. But when I added
<property name="hibernate.cache.use_second_level_cache">true</property> <property name="hibernate.cache.use_query_cache">true</property>
it is still not working.
hibernate 4 is JPA2 implementation, and since JPA2 has now standardized how caching works you need to pass him standard configuration options.
take a look at documentation to find out what exacly are they