Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error with hibernate3 and spring

 
Erwin Bredford
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranchers
i am having a problem runing my spring app it is combine with hibernate working as my orm and i am running on JBoss.
this is error it gives me can't find net/sf/ehcache/CacheExceptionnet.sf.encache .
i don't get it this class doesnot exist in hibernate3 and hibernate2 jars

please could you help?
thanks
<code>
2005-11-24 17:35:08,343 INFO [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
2005-11-24 17:35:08,343 INFO [org.hibernate.cfg.SettingsFactory] Query cache: disabled
2005-11-24 17:35:08,359 INFO [org.hibernate.cfg.SettingsFactory] Cache provider: org.hibernate.cache.EhCacheProvider
2005-11-24 17:35:08,374 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,dataSource,sessionFactory,transactionManager]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [messageSource]; root of BeanFactory hierarchy}
2005-11-24 17:35:08,390 ERROR [org.springframework.web.servlet.DispatcherServlet] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/box79-servlet.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1610)
at java.lang.Class.getConstructor0(Class.java:1922)
at java.lang.Class.newInstance0(Class.java:278)
at java.lang.Class.newInstance(Class.java:261)
at org.hibernate.cfg.SettingsFactory.createCacheProvider(SettingsFactory.java:323)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:219)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1463)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1004)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:726)
</code>
 
Juan Pablo Ram�rez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the jar you need ehcache-1.1.jar put it inside WEB-INF/lib (and your claspath for compile and run)
 
Sri Jad
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Juan Pablo Ram�rez,

Your solution worked for me..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic