I ran into the "Second-level cache is not enabled" error recently even though I had the hibernate.cache.use_query_cache and hibernate.cache.use_second_level_cache parameters defined as true. The issue was resolved when I also defined the hibernate.cache.provider_class as org.hibernate.cache.EhCacheProvider.