-->
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.  [ 2 posts ] 
Author Message
 Post subject: EntityManager - NoSuchMethodError AnnotationConfiguration.se
PostPosted: Fri Feb 15, 2008 10:33 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 8:26 am
Posts: 25
I'm trying to set iReport to use Hibernate as EJBQL connection. I put this files in classpath:

Quote:
D:\Java\hibernate-3.2\hibernate3.jar
D:\Java\hibernate-entitymanager-3.3.1.GA\hibernate-entitymanager.jar
D:\Java\Jaybird-2.1.1JDK_1.5\jaybird-full-2.1.1.jar
D:\Java\hibernate-annotations-3.3.0.GA\lib\ejb3-persistence.jar
D:\Java\hibernate-annotations-3.3.0.GA\lib\hibernate-commons-annotations.jar
D:\Java\hibernate-annotations-3.3.0.GA\hibernate-annotations.jar


But when I test the connection I get this exception:

Quote:
java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.setEntityNotFoundDelegate(Lorg/hibernate/proxy/EntityNotFoundDelegate;)V
at org.hibernate.ejb.Ejb3Configuration.<init>(Ejb3Configuration.java:131)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at com.jaspersoft.ireport.designer.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java:138)
at com.jaspersoft.ireport.designer.connection.EJBQLConnection$1.run(EJBQLConnection.java:188)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)



I look in the hibernate svn and the AnnotationConfiguration class really don't have the method called by Ejb3Configuration. Why this? How can I solve this?

The version of my files are:
Hibernate 3.2.6 GA
Annotations 3.3.0 GA
EntityManager 3.3.1 GA

Firebird 1.5.4


Thanks,

_________________
---
Felipe Marin Cypriano


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 19, 2008 8:44 am 
Beginner
Beginner

Joined: Tue Mar 13, 2007 8:26 am
Posts: 25
So, I found that hibernate3.jar in iReport/lib is out of date. I replace with my hibernate3.jar file and the missing method was found but now the error changed to:

Quote:
java.lang.NoClassDefFoundError: org/hibernate/bytecode/cglib/BytecodeProviderImpl
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:690)
at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:682)
at org.hibernate.cfg.Environment.<clinit>(Environment.java:568)
at org.hibernate.cfg.Configuration.reset(Configuration.java:174)
at org.hibernate.cfg.AnnotationConfiguration.reset(AnnotationConfiguration.java:220)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:193)
at org.hibernate.cfg.Configuration.<init>(Configuration.java:197)
at org.hibernate.cfg.AnnotationConfiguration.<init>(AnnotationConfiguration.java:96)
at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:105)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at com.jaspersoft.ireport.designer.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java: 138)
at com.jaspersoft.ireport.designer.connection.EJBQLConnection$1.run(EJBQLConnection.java:188)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)


I don't get why. The class org.hibernate.bytecode.cglib.BytecodeProviderImpl is packaged inside hibernate3.jar and not in other jar.

Any ideas why this happens?

_________________
---
Felipe Marin Cypriano


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