hi all,
i'm using hibernate with mysql 4.0.15 but am getting an error when trying to do a schemaupdate :
Code:
[java] java.sql.SQLException: No suitable driver
[java] at java.sql.DriverManager.getConnection(DriverManager.java:532)
[java] at java.sql.DriverManager.getConnection(DriverManager.java:140)
[java] at net.sf.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:95)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:111)
[java] at net.sf.hibernate.tool.hbm2ddl.SchemaUpdate.main(SchemaUpdate.java:87)
i see from the documentation that the schemaupdate is "depends heavily upon the JDBC metadata API, so it will not work with all JDBC drivers"
is mysql 4 one of these drivers? has anybody got this to work with mysql?
i'm using schema update as follows :
Code:
<java classname="net.sf.hibernate.tool.hbm2ddl.SchemaUpdate" fork="true">
<arg value="--output=${database.schema.file}"/>
<arg value="--text"/>
<arg value="--delimiter=;"/>
<arg line="${hibernate.mappings}"/>
<jvmarg value="-Dhibernate.connection.driver.class=${database.driver}"/>
<jvmarg value="-Dhibernate.connection.url=${database.url}"/>
<jvmarg value="-Dhibernate.connection.username=${database.username}"/>
<jvmarg value="-Dhibernate.connection.password=${database.password}"/>
<jvmarg value="-Dhibernate.dialect=${database.dialect}"/>
<classpath refid="schema.class.path" />
</java>
with connection details :
Code:
database.url = jdbc:mysql://${database.host}:3306/${database.name}
database.driver = org.gjt.mm.mysql.Driver
database.dialect = net.sf.hibernate.dialect.MySQLDialect
database.username = xxx
database.password = xxx
if anybody has got this working or knows a workaround i would greatly appreciate some help.
cheers,
colum.