-->
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: schemaupdate with mysql 4.0.15
PostPosted: Fri Apr 30, 2004 6:30 am 
Newbie

Joined: Thu Feb 26, 2004 7:29 am
Posts: 17
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.


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.