-->
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: MappingException is lost
PostPosted: Thu Nov 16, 2006 5:57 am 
Newbie

Joined: Thu Nov 16, 2006 5:45 am
Posts: 2
Hello,

Here an extract of code where the original MappingException is lost.

It is a pity because the original exception has more information to identify the cause of the error.
Indeed, I was obliged to use the debugger to understand my error.

org.hibernate.cfg.annotations.EntityBinder
line 220 :
catch (MappingException me) {
throw new AnnotationException( "Use of the same entity name twice: " + name );
}

Is it possible to replace with
throw new AnnotationException( "Use of the same entity name twice: " + name, me);


thank you and cheer for your work on Hibernate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 23, 2006 1:04 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
your error was that you used the same entity name twice, and the name is given to the message.
What additional information was useful?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 24, 2006 6:22 am 
Newbie

Joined: Thu Nov 16, 2006 5:45 am
Posts: 2
In fact, the MappingException has a more precise message (with the package name) :

the AnnotationException message :
org.hibernate.AnnotationException: Use of the same entity name twice: Auteur

the MappingException message :
org.hibernate.DuplicateMappingException: duplicate import: Auteur refers to both fr.xavier.pluton.entity.Auteur and fr.xavier.pluton.domain.Auteur (try using auto-import="false")


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.