aspose file tools*
The moose likes Object Relational Mapping and the fly likes net. sf. hibernate. MappingException: duplicate import -- WTF? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "net. sf. hibernate. MappingException: duplicate import -- WTF?" Watch "net. sf. hibernate. MappingException: duplicate import -- WTF?" New topic
Author

net. sf. hibernate. MappingException: duplicate import -- WTF?

Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
I sure got off the wrong foot with Hibernate. I'm blocked by this error when I'm trying to intitialize hibernate. Here's what I'm trying to do:



The problem happens where I have the try/ctach. Here it is:



So apparently I attempt to import "accounts" twice... Here's my hibernate.cfg.xml:



Any idea what could be causing this error?
[ March 24, 2005: Message edited by: Ivan Jouikov ]
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
When I've seen that with mine it was a copy paste error where I forgot to change the class name attribute.
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
Hmmm, not sure what happened to my post there.

Anyways, when that has happened to me it was a copy paste error. Make sure the class name attribute is correct in all the files.
Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
Well the only time that I do reference the Accounts is in my "Accounts.cfg.xml", and it's no typo.
Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
Here is the mapping:



(class org.ablogic.hibernate.Accounts does exist)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: net. sf. hibernate. MappingException: duplicate import -- WTF?