-->
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.  [ 3 posts ] 
Author Message
 Post subject: NoSuchMethodError in Hibernate Validator 3.1.0.CR1
PostPosted: Mon Aug 18, 2008 10:59 am 
Newbie

Joined: Mon Aug 18, 2008 10:07 am
Posts: 2
According to the Compatibility Matrix the Hibernate Validator 3.1.0 CR1 should be compatible with Core 3.3.x, but it seems that some class incompatibility exists between Hibernate Validator 3.1.0 CR1 and Hibernate 3.3.0.GA.

org.hibernate.validator.event.ValidateEventListener uses org.hibernate.event.PreInsertEvent.getSource() absent in the Hibernate 3.3.0.GA, as a result:

java.lang.NoSuchMethodError: org.hibernate.event.PreInsertEvent.getSource()Lorg/hibernate/engine/SessionImplementor

Details:

Hibernate 3.3.0.GA
Hibernate Commons Annotations 3.1.0.CR2
Hibernate Annotations 3.4.0.CR2
Hibernate EntityManager 3.4.0.CR2
Hibernate Validator 3.1.0.CR1

Debug level Hibernate log excerpt:

Code:
INFO  o.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.CR2
INFO  org.hibernate.cfg.Environment - Hibernate 3.3.0.GA
INFO  org.hibernate.cfg.Environment - hibernate.properties not found
INFO  org.hibernate.cfg.Environment - Bytecode provider name : javassist
INFO  org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
INFO  o.h.annotations.common.Version - Hibernate Commons Annotations 3.1.0.CR2
INFO  org.hibernate.ejb.Version - Hibernate EntityManager 3.4.0.CR2
...
INFO  org.hibernate.validator.Version - Hibernate Validator 3.1.0.CR1
...
INFO  o.h.c.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
INFO  o.h.c.DriverManagerConnectionProvider - Hibernate connection pool size: 20
INFO  o.h.c.DriverManagerConnectionProvider - autocommit mode: true
INFO  o.h.c.DriverManagerConnectionProvider - using driver: org.apache.derby.jdbc.ClientDriver at URL: jdbc:derby://localhost:1527/database;create=true
INFO  o.h.c.DriverManagerConnectionProvider - connection properties: {user=app, password=app, autocommit=true, release_mode=auto}
DEBUG o.h.c.DriverManagerConnectionProvider - opening new JDBC connection
DEBUG o.h.c.DriverManagerConnectionProvider - created connection to: jdbc:derby://localhost:1527/database;create=true, Isolation Level: 2
INFO  org.hibernate.cfg.SettingsFactory - RDBMS: Apache Derby, version: 10.3.2.1 - (599110)
INFO  org.hibernate.cfg.SettingsFactory - JDBC driver: Apache Derby Network Client JDBC Driver, version: 10.3.1.4 - (561794)
INFO  org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.DerbyDialect
INFO  o.h.t.TransactionFactoryFactory - Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
INFO  o.h.t.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
INFO  org.hibernate.cfg.SettingsFactory - Automatic flush during beforeCompletion(): disabled
INFO  org.hibernate.cfg.SettingsFactory - Automatic session close at end of transaction: disabled
INFO  org.hibernate.cfg.SettingsFactory - Scrollable result sets: enabled
DEBUG org.hibernate.cfg.SettingsFactory - Wrap result sets: disabled
INFO  org.hibernate.cfg.SettingsFactory - JDBC3 getGeneratedKeys(): disabled
INFO  org.hibernate.cfg.SettingsFactory - Connection release mode: auto
INFO  org.hibernate.cfg.SettingsFactory - Default batch fetch size: 1
INFO  org.hibernate.cfg.SettingsFactory - Generate SQL with comments: disabled
INFO  org.hibernate.cfg.SettingsFactory - Order SQL updates by primary key: disabled
INFO  org.hibernate.cfg.SettingsFactory - Order SQL inserts for batching: disabled
INFO  org.hibernate.cfg.SettingsFactory - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
INFO  o.h.h.ast.ASTQueryTranslatorFactory - Using ASTQueryTranslatorFactory
INFO  org.hibernate.cfg.SettingsFactory - Query language substitutions: {}
INFO  org.hibernate.cfg.SettingsFactory - JPA-QL strict compliance: enabled
...
DEBUG o.h.p.entity.AbstractEntityPersister - Static SQL for entity: jpatest.Customer
DEBUG o.h.p.entity.AbstractEntityPersister -  Version select: select LAST_UPDATED_TIME from CUSTOMER where CUST_ID =?
...
DEBUG o.h.p.entity.AbstractEntityPersister -  Insert 0: insert into CUSTOMER (APPT, city, CUST_TYPE, FIRST_NAME, LAST_NAME, street, LAST_UPDATED_TIME, ZIP_CODE, CUST_ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
...
DEBUG o.h.p.entity.AbstractEntityPersister -  Identity insert: insert into CUSTOMER (CUST_ID, APPT, city, CUST_TYPE, FIRST_NAME, LAST_NAME, street, LAST_UPDATED_TIME, ZIP_CODE) values (default, ?, ?, ?, ?, ?, ?, ?, ?)
...
DEBUG org.hibernate.impl.SessionImpl - opened session at timestamp: 12190674797
DEBUG o.h.transaction.JDBCTransaction - begin
DEBUG org.hibernate.jdbc.ConnectionManager - opening JDBC connection
DEBUG o.h.transaction.JDBCTransaction - current autocommit status: true
DEBUG o.h.transaction.JDBCTransaction - disabling autocommit
DEBUG o.h.e.def.AbstractSaveEventListener - executing identity-insert immediately
Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.event.PreInsertEvent.getSource()Lorg/hibernate/engine/SessionImplementor;
    at org.hibernate.validator.event.ValidateEventListener.onPreInsert(ValidateEventListener.java:172)
    at org.hibernate.action.EntityIdentityInsertAction.preInsert(EntityIdentityInsertAction.java:142)
    at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:65)
    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
    at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
    at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
    at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49)
    at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154)
    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110)
    at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
    at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:645)
    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:619)
    at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:623)
    at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220)
    at jpatest.Main.main(Main.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 18, 2008 11:09 am 
Newbie

Joined: Mon Aug 18, 2008 10:07 am
Posts: 2
Oops... This is already reported in the Hibernate JIRA.


Top
 Profile  
 
 Post subject: NoSuchMethodError in Hibernate Validator 3.1.0.CR1
PostPosted: Mon Oct 06, 2008 8:06 am 
Newbie

Joined: Mon Oct 06, 2008 7:51 am
Posts: 1
Location: New York, NY
I downloaded the latest versions of hibernate core and hibernate validator. But the problem still exists. Has anyone found any fix/workaround for this issue??

_________________
Thiru Doddi


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.