I\'m recieving the following error when trying to do inserts:
java.lang.NoSuchMethodError : org.hibernate.event.PreInsertEvent.getSource()Lorg/hibernate/
The actual problem for me when this error occurred is
Hibernate-core dependency was not in my EAR packaging.
By default it was picking the jboss.4.2.3/.../lib's hibernate3.jar.
Just adding hibernate-core-3.3.1.GA to my dependencies list in EAR packaging.
Already had the overriding of loaders set in jboss-app.xml.
Excluded the hibernate-core from hibernate-entitymanager-3.4.0.GA (don't think this is required as the core supplied will be 3.3.0.SP1 and will be omitted anyhow).
It worked with some exclusions of some already existing xml-apis, ejb3-persistence, etc. dependecies from the hibernate-core.
Finally the core dependency looked like this.
org.hibernate
hibernate-core
3.3.1.GA
ejb3-persistence
org.hibernate
jta
javax.transaction
persistence-api
javax.persistence
xml-apis
xml-apis
Note: I don't think cglib is required is its not relevant to this context.
Hope this is useful for someone.