This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Spring and the fly likes Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: ...please help me Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: ...please help me " Watch "Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: ...please help me " New topic
Author

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

Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
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


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Al Coson
Greenhorn

Joined: Nov 18, 2009
Posts: 4
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

Joined: Nov 18, 2009
Posts: 4
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

Joined: Dec 01, 2008
Posts: 71
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.

- Aditya Webservices Blog
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Caused by: org.hibernate.HibernateException: could not instantiate CacheProvider: ...please help me
 
Similar Threads
Spring+Hibernate can't create SessionFactory bean
Error creating bean with name 'sessionFactory' defined in ServletContext resource..please help
*.hibernate3.LocalDataSourceConnectionProvider cannot be cast to *.ConnectionProvider
spring 2.5.3 / hibernate 3 sessionFactory NullPointerException
Problem about :Config the EventListener (org.hibernate.event) in ApplicationContext.xml