Joined: Sat Jan 28, 2006 1:10 pm Posts: 6
|
Hi All,
I am trying to convert my application from xdoclet to hibernate annotations. I have the following task defined
--------------------------------------------------------------------------------
<target name="build-schema" depends="package-dao"
description="create the schema and populate it with test data">
<taskdef
name="hibernatetool"
classname="org.hibernate.tool.ant.HibernateToolTask">
<classpath>
<path refid="hibernate.classpath"/>
</classpath>
</taskdef>
<hibernatetool destdir="${build.dir}">
<classpath>
<!-- puting dao jar file here causes ValidatorMessages.properties
not be picked up....So put in the hibernate.classpath-->
</classpath>
<annotationconfiguration configurationfile="${src}/dao/com/tacoma/dao/hibernate/hibernate.cfg.xml"/>
<hbm2ddl drop="false" create="true" export="true"
outputfilename="${webapp.name}-create.sql" delimiter=";" format="true"/>
<hbm2ddl drop="true" create="true" export="false"
outputfilename="${webapp.name}-drop.sql" delimiter=";" format="true"/>
</hibernatetool>
</target>
-----------------------------------------------------------------------------
The schema generation works fine but the export to the database fails.
-------------------------------------------------------------------------
[hibernatetool] SEVERE: schema export unsuccessful
[hibernatetool] java.sql.SQLException: No suitable driver
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:545)
[hibernatetool] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[hibernatetool] at
-----------------------------------------------------------------------
and yes the jar file containing the database driver is right there in the hibernate classpath. Anyone else faced this problem?
I am using hibernate tools 3.1 beta 4.
Thanks in advance
|
|