This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes error with hibernate3 and spring Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Reply Bookmark "error with hibernate3 and spring" Watch "error with hibernate3 and spring" New topic
Author

error with hibernate3 and spring

chinedu efoagui
Ranch Hand

Joined: Feb 11, 2003
Posts: 167
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>


--One learns a lot during a lesson but seeing is not enough,you must do;knowing is not enough ,you must apply--<br />SCJP 1.4,SCBCD,SCEA part 1,OCM JEE Enterprise Architect.
Juan Pablo Ram�rez
Greenhorn

Joined: Mar 04, 2006
Posts: 2
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

Joined: Apr 25, 2005
Posts: 49
Thanks Juan Pablo Ram�rez,

Your solution worked for me..
 
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: error with hibernate3 and spring
 
Similar Threads
ExceptionInInitializerError NoClassDefFoundError
Problem with Hibernate while using with Spring
hibernate error
New to hibernate .Error in executing my first program
Integrating hibernate with spring