History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-15871
Type: Bug Bug
Status: Open Open
Assignee: Gregory Shrago
Reporter: Thomas Edwin Santosa
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

NoCachingEnabledException while running hql console

Created: 18 Oct 07 23:42   Updated: 19 Oct 07 00:05
Component/s: J2EE.Hibernate

Build: 7,361
Severity: High


 Description  « Hide
I got this exception while running a hql:
org.hibernate.HibernateException: Could not instantiate cache implementation
	at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:64)
	at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:240)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
Caused by: org.hibernate.cache.NoCachingEnabledException: Second-level cache is not enabled for usage [hibernate.cache.use_second_level_cache | hibernate.cache.use_query_cache]
	at org.hibernate.cache.NoCacheProvider.buildCache(NoCacheProvider.java:21)
	at org.hibernate.cache.CacheFactory.createCache(CacheFactory.java:61)
	... 30 more

my hibernate.cfg.xml does not contain any property configuration but class mappings.
by the way, the open hql console menu is hard to find.



 All   Comments   Work Log   Change History      Sort Order:
Thomas Edwin Santosa - 18 Oct 07 23:55
It can be worked around by adding
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

to my hibernate.cfg.xml.