-->
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: SchemaExport "duplicate import" (hibernate 2.1.7)
PostPosted: Sun Aug 07, 2005 8:27 pm 
Newbie

Joined: Tue Mar 09, 2004 6:19 pm
Posts: 3
Hibernate version: 2.1.7
Issue: shemaexport

Hello, my schemaexport is not working so well. I am using the following target in ant:

Code:
    <target name="schemaexport" depends="compile">
        <taskdef name="schemaexport"
            classname="net.sf.hibernate.tool.hbm2ddl.SchemaExportTask"
            classpathref="basic.path"/>

        <schemaexport
            config="${output.dir}/classes/hibernate.cfg.xml"
            quiet="no"
            text="no"
            drop="no"
            delimiter=";"
            output="sql/schema-export.sql">
            <fileset dir="${output.dir}/classes">
                <include name="**/*.hbm.xml"/>
            </fileset>
        </schemaexport>
    </target>


My issue is that I keep getting a duplicate import exception being thrown. I had a look through all my jars and class build directories and could not find a duplicate class import... I also tried downloading the most recent 2.x release and it still gives me grief.
Anyone come across this and solved it?

Comments are most welcome.

Kind regards
SH


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 08, 2005 2:50 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
could it be that you also include your mappings in the cfg.xml file ?
then you will of course get a duplicate import when you also include them via the fileset.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 13, 2005 10:44 pm 
Newbie

Joined: Tue Mar 09, 2004 6:19 pm
Posts: 3
Actually, I figured out it is a bug after looking through the source code. We will continue to use the .properties solution over the cfg.xml until we move to Hibernate 3.

Thanks anyway...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 14, 2005 3:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
bug where ? in hibernate or in your stuff ?

dont see what .properties has to do with cfg.xml in this case...but thats up to you ,)

_________________
Max
Don't forget to rate


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.