This week's book giveaway is in the Features new in Java 9 forum.
We're giving away four copies of Java 9 Revealed and have Kishori Sharan on-line!
See this thread for details.
Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: ...please help me  RSS feed

 
Vinod Vinu
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam working on a j2ee using struts, spring and hibernate using mysql .

Iam getting the following error on my console of ecplise :-


Following is my applicationContext.xml:-



Thanks in advance
 
Al Coson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you have supplyed the right cache provider? It seems as you have provided org.hibernate.hql.ast.ASTQueryTranslatorFactory Which by the look of the name doesn't have much to do with cache.

I dont know much about this, probably less than you, but id try replace that with something else. Like: org.hibernate.cache.EhCacheProvider

This is probably the solution to the other thread you alos posted.

Do tell how it goes.
 
Al Coson
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using this for my cache provider: "org.hibernate.cache.NoCacheProvider". Why? I have not clue. Does it work? It sure does.
 
Aditya Keyal
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot use org.hibernate.hql.ast.ASTQueryTranslatorFactory since it implements QueryTranslatorFactory.

For the CacheProvider you need to use any of the following classes
1) AbstractJndiBoundCacheProvider
2) EhCacheProvider
3)HashtableCacheProvider,
4) NoCacheProvider,
5) OptimisticTreeCacheProvider,
6) OSCacheProvider,
7) SwarmCacheProvider,
8) TreeCacheProvider

You can get more details on all of the above from the given links.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!