Implementation of hibernate-memcached - Getting exception

112 views
Skip to first unread message

Preeti Khodanpur

unread,
Apr 30, 2013, 1:27:04 AM4/30/13
to hibernate...@googlegroups.com
I have configured my hibernate.cfg.xml file and the jars hibernate-memcached-1.3 and memcached-2.3.1.jar are there in classpath.

hibernate.cfg.xml

<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://Amazon RDS:3306/emp</property>
      <property name="hibernate.connection.username">root</property>
      <property name="hibernate.connection.password">Welcome123</property>
      <property name="hibernate.connection.pool_size">10</property>
      <property name="show_sql">true</property>
      <property name="format_sql">true</property>
      <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property>
      <property name="hibernate.connection.autocommit">true</property>
      <property name="hibernate.hbm2ddl.auto">update</property>
      
        <property name="cache.provider_class">com.googlecode.hibernate.Memcached.MemcachedCacheProvider</property>
<property name="hibernate.Memcached.servers">MEMCACHED NODE:11211</property>
<property name="hibernate.Memcached.cacheTimeSeconds">300</property>
<property name="hibernate.Memcached.connectionFactory">BinaryConnectionFactory</property>
 
      <mapping resource="com/mindtree/entity/Employee.hbm.xml"/>
     
</session-factory>
</hibernate-configuration>

But getting following error even though jars are available on classpath. Please suggest me on this.

java.lang.ClassNotFoundException: com.googlecode.hibernate.Memcached.MemcachedCacheProvider
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
	org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
	java.lang.Class.forName0(Native Method)
	java.lang.Class.forName(Class.java:188)
	org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
	org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:371)
	org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:241)
	org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
	org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
	com.mindtree.dao.EmployeeDaoImpl.addEmployee(EmployeeDaoImpl.java:19)
	com.mindtree.controller.FrontHandler.doProcess(FrontHandler.java:59)
	com.mindtree.controller.FrontHandler.doGet(FrontHandler.java:34)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Ray Krueger

unread,
Apr 30, 2013, 7:37:59 AM4/30/13
to hibernate...@googlegroups.com
It is com.googlecode.hibernate.memcached.MemcachedCacheProvider

Not
com.googlecode.hibernate.Memcached.MemcachedCacheProvider

:)


--
You received this message because you are subscribed to the Google Groups "hibernate-memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hibernate-memca...@googlegroups.com.
To post to this group, send email to hibernate...@googlegroups.com.
Visit this group at http://groups.google.com/group/hibernate-memcached?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Preeti Khodanpur

unread,
Apr 30, 2013, 8:58:44 AM4/30/13
to hibernate...@googlegroups.com
Hi Ray,

That was really a silly mistake :) 
Thanks for the help :)


Reply all
Reply to author
Forward
0 new messages