-->
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.  [ 4 posts ] 
Author Message
 Post subject: Exception with updated Annotations Beta 7
PostPosted: Tue Dec 13, 2005 2:25 pm 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
Hello everyone,

With Hibernate 3.1 final and Annotations beta 7, I get the following exception during SessionFactory initialization:

java.lang.NoSuchMethodError: javax.persistence.OneToMany.targetEntity()Ljava/lang/Class;
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1197)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:654)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:266)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:199)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1146)

I have searched my whole project for invocations of that method (targetEntity), but I could not find any. Besides, a clean build does not reveal any errors in Eclipse.

I also copied the current ejb3-persistence.jar from the annotations archive.

Any idea where I could start searching?

Regards,

Andreas


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 13, 2005 8:18 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you have the old ejb3-persistence somewhere probably (the one with targetEntity as string)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 6:21 am 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
You are right, that's my fault. Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 14, 2005 6:23 am 
Regular
Regular

Joined: Tue Jan 06, 2004 3:32 pm
Posts: 80
Location: Munich, Germany
For the records: Make sure that you also delete ejb-3.0-edr2.jar (which is a relict from alpha versions of Hibernate Annotations)


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