-->
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.  [ 14 posts ] 
Author Message
 Post subject: search - regression tests - AbstractMethodError
PostPosted: Mon Apr 12, 2010 10:47 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
Code:
mysql-connector-java - 5.0.7
hibernate-search - 3.2.0.Beta1
hibernate-core - 3.5.0-Final
hibernate-annotations - 3.5.0-Final
hibernate-entitymanager - 3.5.0-Final


We have a new problem that we didn't have before
with older version :
Code:
Hibernate Search - 3.1.0.GA
hibernate-entitymanager - 3.4.0.GA
hibernate-annotations - 3.4.0.GA
hibernate-core - 3.3.2.GA

It's possible that it came with final version of Hibernate core, and others.
Code:
Exception in thread "Main Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in class path resource [META-INF/PostGreSQL-daoContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: getSharedCacheMode
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
   at clara.prototype.metier.pojo.DemandeSearchManagerMetierTest.main(DemandeSearchManagerMetierTest.java:20)
Caused by: java.lang.AbstractMethodError: getSharedCacheMode
   at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:509)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
   at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
   ... 14 more

this exception is up just in last version..

G. S.


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Mon Apr 12, 2010 10:56 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
I have also this exception (in my Batch Indexer)
Code:
Exception in thread "Main Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in class path resource [META-INF/MySQL-daoContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: getValidationMode
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
   at IndexBase.main(IndexBase.java:26)
Caused by: java.lang.AbstractMethodError: getValidationMode
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:613)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
   at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
   ... 14 more


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Fri Apr 16, 2010 5:26 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
First, I'd recommend you use Hibernate Search 3.2 CR1, this is the version we know works with Hibernate Core 3.5.
It seems your exceptions are due to you having a wrong JPA api jar in your classpath (maybe JPA 1?). I recommend you use http://repository.jboss.com/maven2/org/ ... 0.0.Final/ and make sure to remove the old jpa one jar (in hibernate we used to name it ejb3-persistence.jar)

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Fri Apr 16, 2010 6:14 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
same problem..
I remove all of my local repository...
I make many clean install, clean project.. but it's all time the same exception up..

Code:
INFO  ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@2a2605: display name [org.springframework.context.support.ClassPathXmlApplicationContext@2a2605]; startup date [Fri Apr 16 12:07:55 CEST 2010]; root of context hierarchy
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/PostGreSQL-applicationContext.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
DEBUG PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd}
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/PostGreSQL-daoContext.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
DEBUG BeanDefinitionParserDelegate - Neither XML 'id' nor 'name' specified - using generated bean name [org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0]
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'ligneDao' as bean name and [] as aliases
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'demandeDao' as bean name and [] as aliases
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'ligneDemandeDao' as bean name and [] as aliases
DEBUG DefaultBeanDefinitionDocumentReader - Imported 5 bean definitions from relative location [PostGreSQL-daoContext.xml]
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/dependenciesInjectionContext.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'ligneSearchManagerMetier' as bean name and [] as aliases
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'demandeSearchManagerMetier' as bean name and [] as aliases
DEBUG BeanDefinitionParserDelegate - No XML 'id' specified - using 'ligneDemandeSearchManagerMetier' as bean name and [] as aliases
DEBUG DefaultBeanDefinitionDocumentReader - Imported 3 bean definitions from relative location [dependenciesInjectionContext.xml]
INFO  XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/transactionContext.xml]
DEBUG DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
DEBUG PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
DEBUG DefaultBeanDefinitionDocumentReader - Loading bean definitions
DEBUG DefaultBeanDefinitionDocumentReader - Imported 4 bean definitions from relative location [transactionContext.xml]
DEBUG XmlBeanDefinitionReader - Loaded 12 bean definitions from location pattern [META-INF/PostGreSQL-applicationContext.xml]
INFO  ClassPathXmlApplicationContext - Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@2a2605]: org.springframework.beans.factory.support.DefaultListableBeanFactory@213572
DEBUG ClassPathXmlApplicationContext - 12 beans defined in org.springframework.context.support.ClassPathXmlApplicationContext@2a2605: display name [org.springframework.context.support.ClassPathXmlApplicationContext@2a2605]; startup date [Fri Apr 16 12:07:55 CEST 2010]; root of context hierarchy
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0'
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'autoProxyTransactionCreator'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'autoProxyTransactionCreator'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'autoProxyTransactionCreator' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Finished creating instance of bean 'autoProxyTransactionCreator'
DEBUG ClassPathXmlApplicationContext - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@232445]
DEBUG ClassPathXmlApplicationContext - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@234890]
INFO  DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@213572: defining beans [myEntityManagerFactory,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,ligneDao,demandeDao,ligneDemandeDao,ligneSearchManagerMetier,demandeSearchManagerMetier,ligneDemandeSearchManagerMetier,transactionManager,transactionInterceptor,transactionAttributes,autoProxyTransactionCreator]; root of factory hierarchy
DEBUG DefaultListableBeanFactory - Creating shared instance of singleton bean 'myEntityManagerFactory'
DEBUG DefaultListableBeanFactory - Creating instance of bean 'myEntityManagerFactory'
DEBUG DefaultListableBeanFactory - Eagerly caching bean 'myEntityManagerFactory' to allow for resolving potential circular references
DEBUG DefaultListableBeanFactory - Invoking afterPropertiesSet() on bean with name 'myEntityManagerFactory'
DEBUG PersistenceUnitReader - Found schema resource: jar:file:/C:/Documents%20and%20Settings/xxx/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.0-Final/hibernate-entitymanager-3.5.0-Final.jar!/org/hibernate/ejb/persistence_1_0.xsd
INFO  LocalContainerEntityManagerFactoryBean - Building JPA container EntityManagerFactory for persistence unit 'test'
INFO  Version - Hibernate Annotations 3.5.0-Final
INFO  Environment - Hibernate 3.5.0-Final
INFO  Environment - hibernate.properties not found
INFO  Environment - Bytecode provider name : javassist
INFO  Environment - using JDK 1.4 java.sql.Timestamp handling
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid] -> [class org.hibernate.id.UUIDHexGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [hilo] -> [class org.hibernate.id.TableHiLoGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [assigned] -> [class org.hibernate.id.Assigned]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [identity] -> [class org.hibernate.id.IdentityGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [select] -> [class org.hibernate.id.SelectGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence] -> [class org.hibernate.id.SequenceGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [seqhilo] -> [class org.hibernate.id.SequenceHiLoGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [increment] -> [class org.hibernate.id.IncrementGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [foreign] -> [class org.hibernate.id.ForeignGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [guid] -> [class org.hibernate.id.GUIDGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid.hex] -> [class org.hibernate.id.UUIDHexGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence-identity] -> [class org.hibernate.id.SequenceIdentityGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-sequence] -> [class org.hibernate.id.enhanced.SequenceStyleGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-table] -> [class org.hibernate.id.enhanced.TableGenerator]
INFO  Version - Hibernate Commons Annotations 3.2.0.Final
INFO  Version - Hibernate EntityManager 3.5.0-Final
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid] -> [class org.hibernate.id.UUIDHexGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [hilo] -> [class org.hibernate.id.TableHiLoGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [assigned] -> [class org.hibernate.id.Assigned]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [identity] -> [class org.hibernate.id.IdentityGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [select] -> [class org.hibernate.id.SelectGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence] -> [class org.hibernate.id.SequenceGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [seqhilo] -> [class org.hibernate.id.SequenceHiLoGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [increment] -> [class org.hibernate.id.IncrementGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [foreign] -> [class org.hibernate.id.ForeignGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [guid] -> [class org.hibernate.id.GUIDGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [uuid.hex] -> [class org.hibernate.id.UUIDHexGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [sequence-identity] -> [class org.hibernate.id.SequenceIdentityGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-sequence] -> [class org.hibernate.id.enhanced.SequenceStyleGenerator]
DEBUG DefaultIdentifierGeneratorFactory - Registering IdentifierGenerator strategy [enhanced-table] -> [class org.hibernate.id.enhanced.TableGenerator]
INFO  DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@213572: defining beans [myEntityManagerFactory,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,ligneDao,demandeDao,ligneDemandeDao,ligneSearchManagerMetier,demandeSearchManagerMetier,ligneDemandeSearchManagerMetier,transactionManager,transactionInterceptor,transactionAttributes,autoProxyTransactionCreator]; root of factory hierarchy
Exception in thread "Main Thread" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myEntityManagerFactory' defined in class path resource [META-INF/PostGreSQL-daoContext.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: getSharedCacheMode
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
   at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
   at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
   at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
   at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
   at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
   at clara.prototype.metier.pojo.DemandeSearchManagerMetierTest.main(DemandeSearchManagerMetierTest.java:20)
Caused by: java.lang.AbstractMethodError: getSharedCacheMode
   at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:39)
   at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:509)
   at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
   at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
   at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
   ... 14 more


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Wed Apr 28, 2010 5:19 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
Same with :
Code:
<dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-search</artifactId>
            <version>3.2.0.CR1</version>
         </dependency>

         <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-core</artifactId>
            <version>3.5.1-Final</version>
         </dependency>

         <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-annotations</artifactId>
            <version>3.5.1-Final</version>
         </dependency>

         <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.5.1-Final</version>
         </dependency>


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Fri Apr 30, 2010 2:38 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
The exception came from using :

Code:
   <!-- Initialisation d'un entityManagerFactory -->
   <bean id="myEntityManagerFactory"
      class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
      <property name="persistenceProviderClass">
         <value>org.hibernate.ejb.HibernatePersistence</value>
      </property>

      <property name="persistenceXmlLocation">
         <value>classpath:WEB-INF/persistence.xml</value>
      </property>
   </bean>


Because if we use :
Code:
   <!-- Initialisation d'un entityManagerFactory -->
   <bean id="myEntityManagerFactory"
      class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
      <property name="persistenceProviderClass">
         <value>org.hibernate.ejb.HibernatePersistence</value>
      </property>

      <!-- property name="persistenceXmlLocation">
         <value>classpath:WEB-INF/persistence.xml</value>
      </property> -->
   </bean>

It's ok.

That certainly come from method used to create factory in JPA.

(But it's certainly not the only problem... with latest version)


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Fri Apr 30, 2010 3:15 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
the latest version of HSearch realize a big gap
I understand evolution of Hibernate with JPA2 and the rest

But could we imagine create a branch in HSearch 3.1.1.GA
with bug fix in where clause (using OR clause rather than IN clause) and no result bug in case of primary key composed ???

I'm very interested in this..

Regards.

G. S.


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Fri Apr 30, 2010 5:18 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
hi, there is a branch already and some fixes are backported for an eventual 3.1.2.GA but that's currently low-priority.

I'm 99% sure your issue is coming from the fact that you're still are having the other JPA api on classpath; removing wrong dependencies from your maven pom is not necessarily cleaning up your application server classpath.
could you check other paths for the presence of the old JPA api?
Could you try to use JBoss tattletale, it does marvels to scan for this kind of issues, and builds a report with duplicates after scanning all your resources.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Mon May 03, 2010 9:31 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
the application run correctly if i using bean org.springframework.orm.jpa.LocalEntityManagerFactoryBean
and i have an exception if i use bean org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean

I work on an other project during few weeks.

I'll test my ear to target double class declarations.
I'll give you results.

I hope that it's just due to class def conflict.

Thx.

G. S.


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Wed May 05, 2010 6:04 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
I could give you all the report but i'm afraid that it contains no problem...

the only duplicate files are :
Code:
org.apache.commons.collections.ArrayStack     commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.Buffer    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.BufferUnderflowException    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$1    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$CollectionView    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$CollectionView$CollectionViewIterator    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$EntrySet    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$KeySet    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar
org.apache.commons.collections.FastHashMap$Values    commons-beanutils-1.7.0.jar , commons-collections-3.2.1.jar


I could send you all the reporting if you want to be sure.
I think about a bug..

G. S.


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Wed May 05, 2010 9:45 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
I repeat the same problem in small project
two case : one safe / one faille

I've in mind to open JIRA issue in Hibernate-core project.

G. S.


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Wed May 05, 2010 2:58 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
which spring versions? are you sure that version supports JPA2 ? it's quite new

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Thu May 06, 2010 2:48 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
Spring version : 2.5.6

I thought about spring version but software in running correctly when i use org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean

I've just read on forum that spring 2.5.6 isn't compatible with hibernate jpa 2...


Top
 Profile  
 
 Post subject: Re: search - regression tests - AbstractMethodError
PostPosted: Thu May 06, 2010 3:11 am 
Beginner
Beginner

Joined: Fri Feb 05, 2010 10:54 am
Posts: 28
I've just test with spring 3.0.2... and all run
shame on me !

Thanks you s.grinovero

G. S.


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