Discussion:
[Liquibase-user] incorrect database name on generateChangeLog
Marc Logemann
2008-10-10 17:31:31 UTC
Permalink
Hi,

i want to do "generateChangeLog". Here is my liquibase.properties file:

changeLogFile=root.changelog.xml
username=xxxx
password=xxxx
url=jdbc:mysql://localhost/bwh
driver=com.mysql.jdbc.Driver
logLevel=SEVERE

-----

what i get is this. am i correct that is breaks on this line:
readSequences(requestedSchema); ???
All in all its weird. Of course the database "bwh" exists. I can even
chose the default "mysql" db without success.
Any help appreciated.




10.10.2008 19:20:28 liquibase.commandline.Main main
SCHWERWIEGEND: Incorrect database name ''
liquibase.exception.JDBCException: java.sql.SQLException: Incorrect
database name ''
at
liquibase
.database
.structure.SqlDatabaseSnapshot.<init>(SqlDatabaseSnapshot.java:94)
at
liquibase
.database
.structure.MySqlDatabaseSnapshot.<init>(MySqlDatabaseSnapshot.java:55)
at
liquibase
.database.MySQLDatabase.createDatabaseSnapshot(MySQLDatabase.java:163)
at liquibase.diff.Diff.compare(Diff.java:61)
at
liquibase
.commandline
.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:128)
at liquibase.commandline.Main.doMigration(Main.java:578)
at liquibase.commandline.Main.main(Main.java:90)
Caused by: java.sql.SQLException: Incorrect database name ''
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2291)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1159)
at
liquibase
.database
.structure
.MySqlDatabaseSnapshot
.getColumnTypeAndDefValue(MySqlDatabaseSnapshot.java:73)
at
liquibase
.database
.structure.SqlDatabaseSnapshot.readColumns(SqlDatabaseSnapshot.java:275)
at
liquibase
.database
.structure.SqlDatabaseSnapshot.<init>(SqlDatabaseSnapshot.java:85)
... 6 more



--
Marc Logemann
blog http://logemannreloaded.blogspot.com
privat http://www.logemann.org
Marc Logemann
2008-10-10 18:10:39 UTC
Permalink
Hi,

some more details after increasing log level.

marc-logemanns-macbook-pro:liquibase-1.8.1 ml$ ./liquibase.sh
generateChangeLog
Reading tables for root @ jdbc:mysql://localhost/bwh (Default Schema:
bwh) ...
Reading foreign keys for root @ jdbc:mysql://localhost/bwh (Default
Schema: bwh) ...
Reading primary keys for root @ jdbc:mysql://localhost/bwh (Default
Schema: bwh) ...
Reading columns for root @ jdbc:mysql://localhost/bwh (Default Schema:
bwh) ...
Migration Failed: Incorrect database name ''. For more information,
use the --logLevel flag)
10.10.2008 19:42:24 liquibase.commandline.Main main
SCHWERWIEGEND: Incorrect database name ''
liquibase.exception.JDBCException: java.sql.SQLException: Incorrect
database name ''
at
liquibase
.database
.structure.SqlDatabaseSnapshot.<init>(SqlDatabaseSnapshot.java:94)
at
liquibase
.database
.structure.MySqlDatabaseSnapshot.<init>(MySqlDatabaseSnapshot.java:55)
at
liquibase
.database.MySQLDatabase.createDatabaseSnapshot(MySQLDatabase.java:163)
at liquibase.diff.Diff.compare(Diff.java:61)
at
liquibase
.commandline
.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:128)
at liquibase.commandline.Main.doMigration(Main.java:578)
at liquibase.commandline.Main.main(Main.java:90)
Caused by: java.sql.SQLException: Incorrect database name ''
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)



I also added this to the properties file w/o success.

defaultSchemaName=bwh

Really weird why it breaks on reading the columns. I mean, he has no
problems reading tables....


Marc
Post by Marc Logemann
Hi,
changeLogFile=root.changelog.xml
username=xxxx
password=xxxx
url=jdbc:mysql://localhost/bwh
driver=com.mysql.jdbc.Driver
logLevel=SEVERE
-----
Marc Logemann
2008-10-10 18:18:14 UTC
Permalink
Hi.
please forget my thread immediately and sorry for the noise. If i
would not have used a 58 years old MySQL driver, things would have
been better from start. In other words, everything runs fine now with
latest driver.

And for the ones who really want to know HOW old this driver was, it
was 3.1.x, hell, MySQL is at 5.1.x right? :)

regards

Marc
Voxland, Nathan
2008-10-10 19:36:15 UTC
Permalink
Glad you figured it out. It's good to know that even if liquibase
doesn't work with your driver, it should be old enough to vote :)

Nathan

-----Original Message-----
From: Marc Logemann [mailto:***@logemann.org]
Sent: Friday, October 10, 2008 1:18 PM
To: liquibase-***@lists.sourceforge.net
Subject: Re: [Liquibase-user] incorrect database name on
generateChangeLog
Hi.
please forget my thread immediately and sorry for the noise. If i
would not have used a 58 years old MySQL driver, things would have
been better from start. In other words, everything runs fine now with
latest driver.

And for the ones who really want to know HOW old this driver was, it
was 3.1.x, hell, MySQL is at 5.1.x right? :)

regards

Marc

------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Loading...