-->
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.  [ 2 posts ] 
Author Message
 Post subject: Schema export problem when using annotated classes
PostPosted: Fri Aug 25, 2006 11:28 am 
Newbie

Joined: Fri Sep 23, 2005 6:25 am
Posts: 6
Hello,

I have an ant task to create the DDL:

<target name="SchemaExport" depends="init" >
<taskdef name="schemaexport"
classname="org.hibernate.tool.hbm2ddl.SchemaExportTask">
<classpath id="class.path">
<pathelement location="${workspace}/bin"/>
<fileset refid="lib.jar.files"/>
</classpath>
</taskdef>

<echo>hibernateSchemaExport</echo>
<schemaexport
config="${workspace}/bin/hibernate.cfg.xml"
quiet="no"
text="yes"
drop="no"
create="yes"
delimiter="&#xA;${sqlterminator}"
output="${workspace}/bin/create_schema.sql">
</schemaexport>
</target>

When I invoke this task using ant I get the following error:

C:\Projects\Java\HibernateAnnotations\Annotations\build.xml:71: Schema text failed: An AnnotationConfiguration instance is required to use <mapping class="com.acasa.annotation.pojo.basic.BasicPojo"/>

Please help.

Thanks,
Vasile


Top
 Profile  
 
 Post subject: use annotationconfiguration
PostPosted: Thu Sep 14, 2006 5:25 pm 
Newbie

Joined: Thu Feb 24, 2005 1:30 pm
Posts: 4
Location: Los Angeles
use annotationconfiguration


like this:

<target name="schemaexport">
<hibernatetool destdir="${build.dir}/">
<annotationconfiguration configurationfile="${src.dir}/hibernate.cfg.xml" />
<hbm2ddl export="false" outputfilename="sql.ddl" />
</hibernatetool>
</target>

_________________
--
Reza


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