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.  [ 5 posts ] 
Author Message
 Post subject: ehcache error with Hibernate 2.1.8
PostPosted: Sun Feb 06, 2005 10:13 pm 
Newbie

Joined: Sun Feb 06, 2005 10:00 pm
Posts: 3
Location: Melbourne
Hibernate version: 2.1.8
ehcache 0.9
spring 1.1.4

Problem:

When initialising the sessionFactory 2.1.8 throws exception
java.lang.AbstractMethodError: net.sf.ehcache.hibernate.Provider.start

This exception also seems to be thrown where ehcache is not in the runtime classpath. In this case it is in the classpath.

The error does does not when the hibernate jar is swaped for 2.1.6


Full stack trace of any exception that occurs:

07-02 12:06:12 INFO SettingsFactory - Use scrollable result sets: true
07-02 12:06:12 INFO SettingsFactory - Use JDBC3 getGeneratedKeys(): false
07-02 12:06:12 INFO SettingsFactory - Optimize cache for minimal puts: false
07-02 12:06:12 INFO SettingsFactory - echoing all SQL to stdout
07-02 12:06:12 INFO SettingsFactory - Query language substitutions: {}
07-02 12:06:12 INFO SettingsFactory - cache provider: net.sf.ehcache.hibernate.Provider
07-02 12:06:12 INFO Configuration - instantiating and configuring caches

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advertSlotDAO' defined in class path resource [META-INF/advert_context.xml]: Can't resolve reference to bean 'transactionManager' while setting property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [META-INF/common_context.xml]: Can't resolve reference to bean 'sessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [META-INF/common_context.xml]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: net.sf.ehcache.hibernate.Provider.start(Ljava/util/Properties;)V
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [META-INF/common_context.xml]: Can't resolve reference to bean 'sessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [META-INF/common_context.xml]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: net.sf.ehcache.hibernate.Provider.start(Ljava/util/Properties;)V
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [META-INF/common_context.xml]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: net.sf.ehcache.hibernate.Provider.start(Ljava/util/Properties;)V
java.lang.AbstractMethodError: net.sf.ehcache.hibernate.Provider.start(Ljava/util/Properties;)V
at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1133)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:804)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:467)
at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:405)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:287)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveReference(AbstractAutowireCapableBeanFactory.java:954)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveValueIfNecessary(AbstractAutowireCapableBeanFactory.java:889)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:827)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:662)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:270)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:205)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:136)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:432)
at au.com.carsales.bs.ent.common.AppContextTestCase.getBean(AppContextTestCase.java:58)
at au.com.carsales.bs.ent.advert.dao.AdvertSlotDAOTest.setUp(AdvertSlotDAOTest.java:51)
at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

Name and version of the database you are using: Oracle 9.2.0.5


Any ideas?

cheers,

Cam


Top
 Profile  
 
 Post subject: Similiar problem occuring when loading SessionFactory
PostPosted: Sun Feb 06, 2005 10:22 pm 
Newbie

Joined: Sun Feb 06, 2005 10:16 pm
Posts: 1
Location: WI - USA
I too have experience a variation of this problem. My application works fine with Hibernate version 2.1.7c. Version 2.1.8, however, breaks it. It is unable to lead the SessionFactory. As a result, the SessionFactory ends up being set to null and an exception is thrown.

INFO Configuration:1067 - Configured SessionFactory: null

I believe this to be a bug and hope it is fixed soon.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 10:33 pm 
Newbie

Joined: Sun Feb 06, 2005 10:00 pm
Posts: 3
Location: Melbourne
Thanks. I've found it works with 2.1.7c also. Like I said, the only thing I change is to drop the 2.1.8 jar over the 2.1.7c jar and it breaks.

Should also have mentioned previously that the JDK is 1.5.0_01.

cheers,
Cam


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 10:50 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use the org.hibernate provider, as per docs.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 06, 2005 11:33 pm 
Newbie

Joined: Sun Feb 06, 2005 10:00 pm
Posts: 3
Location: Melbourne
Righto. Thanks.

hibernate.cache.provider_class changed to:

net.sf.hibernate.cache.EhCacheProvider

and problem disappears in 2.1.8

cheers,
Cam


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.