• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate cache doubt....

 
shri mon
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the following error when i try to use a cache.

org.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.hibernate.cache.OSCacheProvider
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:265)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:184)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1497)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1041)
at hibernate.util.HibernateUtil.<clinit>(HibernateUtil.java:19)
at hibernate.util.HibernateDBHelper.getRefCodeData(HibernateDBHelper.java:425)
at components.dynamic._auctionStatusLookup_jsp_8._jspService(_auctionStatusLookup_jsp_8.java:96)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.ServicingServletState.service(StrictLifecycleServlet.java:317)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:523)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:119)
at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:479)
at traderclient._searchAuction_jsp_113._jspService(_searchAuction_jsp_113.java:295)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)



The entry which i have in the hibernate.cfg.xml is:

<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.OSCacheProvider</property>

Thanks in advance.
Shrimon
 
bparanj
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by shri mon:
I get the following error when i try to use a cache.

org.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.hibernate.cache.OSCacheProvider

The entry which i have in the hibernate.cfg.xml is:

<property name="hibernate.cache.provider_class">net.sf.hibernate.cache.OSCacheProvider</property>

Thanks in advance.
Shrimon


Hibernate is not able to instantiate the class net.sf.hibernate.cache.OSCacheProvider

Since you have not given the version of Hibernate. It is impossible to tell whether you are using the correct class that Hibernate is looks for during instantiation.

I would suggest you attach the jar file to the IDE and use the debugger to see why it is throwing this exception.

Check the documentation for that particular version of Hibernate and make sure the name of the class is correct.

As far as I know the latest version of Hibernate 3.0, the package names have been changed from net..... to org....

Bala
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic