-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate2.1: Exception (Cache Provider class not found)
PostPosted: Sat Dec 13, 2003 1:44 pm 
Beginner
Beginner

Joined: Thu Oct 09, 2003 11:41 am
Posts: 39
Location: Paris, France
Hi,

I upgraded to hibernate 2.1 from hibernate 2.0.3, and am getting an error (see below).

Here is a snippet from the cfg.xml file:

Code:
... connection details ...
<property name="connection.driver_class">com.sap.dbtech.jdbc.DriverSapDB</property>
<property name="connection.pool_size">10</property>
<property name="hibernate.statement_cache.size">10</property>
   
<property name="show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.SAPDBDialect</property>
<property name="use_outer_join">true</property>

... mappings ...


Here is the error trace:

Code:
javax.servlet.ServletException: could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider
   at net.bookingasp.HibernatePlugIn.initHibernate(HibernatePlugIn.java:140)
   at net.bookingasp.HibernatePlugIn.init(HibernatePlugIn.java:101)
   at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
   at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
   at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
   at java.lang.Thread.run(Thread.java:534)


root cause

net.sf.hibernate.HibernateException: could not instantiate CacheProvider: net.sf.ehcache.hibernate.Provider
   at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:115)
   at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1078)
   at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:724)
   at net.bookingasp.HibernatePlugIn.initHibernate(HibernatePlugIn.java:128)
   at net.bookingasp.HibernatePlugIn.init(HibernatePlugIn.java:101)
   at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:918)
   at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:655)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
   at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
   at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
   at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
   at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
   at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
   at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.hibernate.Provider
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1406)
   at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1254)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:141)
   at net.sf.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:75)
   at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:112)
   ... 37 more

.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 13, 2003 1:58 pm 
Regular
Regular

Joined: Wed Nov 05, 2003 10:57 pm
Posts: 96
Take a look at this post:
http://forum.hibernate.org/viewtopic.php?t=926219&highlight=

mota


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.