-->
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.  [ 1 post ] 
Author Message
 Post subject: getting duplicate import when the names are different
PostPosted: Fri Apr 29, 2005 2:24 pm 
Newbie

Joined: Fri Apr 29, 2005 2:15 pm
Posts: 1
i have two classes named A one under package a.b.c and another under d.e.f

the two mapping that i have are as follows

<class name="a.b.c.A" table="A1">
<id name="AId" type="java.lang.String">
<generator class="assigned" />
</id>
</class>

<class name="d.e.f.A" table="A2">
<id name="AId" type="java.lang.String">
<generator class="assigned" />
</id>
</class>

when i deploy this i get an exception as

12:57:17,662 ERROR [Configuration] Could not compile the mapping document
net.sf.hibernate.MappingException: duplicate import: A
at net.sf.hibernate.cfg.Mappings.addImport(Mappings.java:85)
at net.sf.hibernate.cfg.Binder.bindClass(Binder.java:126)
at net.sf.hibernate.cfg.Binder.bindRootClass(Binder.java:221)
at net.sf.hibernate.cfg.Binder.bindRoot(Binder.java:1256)
at net.sf.hibernate.cfg.Configuration.add(Configuration.java:252)
at net.sf.hibernate.cfg.Configuration.addInputStream(Configuration.java:288)


Do i have to have two different class name even if they are under different packages. i read the documentation and it said about a fully qualfied name. when using package names, the fully qualified name is different, but it gives me this error.
if i remove one of this declaration, everything runs ok,

i am using jobss 4.0.1. and hibernate 2

is there something that i am doing wrong

thanks
Abbasi


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.