# Error using generateChangeLog on existing database

**URL:** <https://forum.liquibase.org/t/error-using-generatechangelog-on-existing-database/1228>\
**Category:** General Discussion\
**Created:** [April 14, 2011, 5:41am UTC](https://forum.liquibase.org/t/error-using-generatechangelog-on-existing-database/1228 "2011-04-14T05:41:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexbinary](https://avatars.discourse-cdn.com/v4/letter/h/d07c76/32.png) [@hexbinary](https://forum.liquibase.org/u/hexbinary)\
**Post date:** [April 14, 2011, 5:41am UTC](https://forum.liquibase.org/t/error-using-generatechangelog-on-existing-database/1228/1 "2011-04-14T05:41:00Z")

</div>

Hi  
  
I’m really interested in using this product. We have an existing database in mysql, but when i run the generateChangeLog command, an error is produced. Any help would be appreciated. I’ve attached the mysqldump output without the data.  
  
marc@betty:~/Downloads/liquibase-all$ ./liquibase --driver=com.mysql.jdbc.Driver --classpath=/home/marc/.m2/repository/mysql/mysql-connector-java/3.0.11/mysql-connector-java-3.0.11.jar --url=“jdbc:mysql://127.0.0.1:3306/oscar\_eyeform” --username= --password= --logLevel=debug generateChangeLog  
Liquibase Home is not set.  
Liquibase Home: /home/marc/Downloads/liquibase-all  
DEBUG 4/13/11 6:33 PM:liquibase: Unable to load/access Apache Derby driver class org.apache.derby.tools.sysinfo to check version: org.apache.derby.tools.sysinfo  
DEBUG 4/13/11 6:33 PM:liquibase: Connected to root@localhost@jdbc:mysql://127.0.0.1:3306/oscar\_eyeform  
DEBUG 4/13/11 6:33 PM:liquibase: Reading tables for root@localhost @ jdbc:mysql://127.0.0.1:3306/oscar\_eyeform …  
INFO 4/13/11 6:33 PM:liquibase: Reading tables for root@localhost @ jdbc:mysql://127.0.0.1:3306/oscar\_eyeform …  
DEBUG 4/13/11 6:33 PM:liquibase: Reading views for root@localhost @ jdbc:mysql://127.0.0.1:3306/oscar\_eyeform …  
INFO 4/13/11 6:33 PM:liquibase: Reading views for root@localhost @ jdbc:mysql://127.0.0.1:3306/oscar\_eyeform …  
DEBUG 4/13/11 6:33 PM:liquibase: Executing QUERY database command: SELECT VIEW\_DEFINITION FROM INFORMATION\_SCHEMA.VIEWS WHERE TABLE\_NAME = ‘CdsClientForm’ AND TABLE\_SCHEMA='oscar\_eyeform’  
Liquibase Update Failed: Empty result set, expected one row  
SEVERE 4/13/11 6:33 PM:liquibase: Empty result set, expected one row  
liquibase.exception.DatabaseException: Error getting jdbc:mysql://127.0.0.1:3306/oscar\_eyeform view with liquibase.statement.core.GetViewDefinitionStatement@8238f4  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readView(JdbcDatabaseSnapshotGenerator.java:168)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readViews(JdbcDatabaseSnapshotGenerator.java:304)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.createSnapshot(JdbcDatabaseSnapshotGenerator.java:241)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.DatabaseSnapshotGeneratorFactory.createSnapshot(DatabaseSnapshotGeneratorFactory.java:69)  
&nbsp;&nbsp;&nbsp; at liquibase.diff.Diff.compare(Diff.java:63)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:145)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:624)  
&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.main(Main.java:116)  
Caused by: liquibase.exception.DatabaseException: Empty result set, expected one row  
&nbsp;&nbsp;&nbsp; at liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:124)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:160)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:168)  
&nbsp;&nbsp;&nbsp; at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:164)  
&nbsp;&nbsp;&nbsp; at liquibase.database.AbstractDatabase.getViewDefinition(AbstractDatabase.java:680)  
&nbsp;&nbsp;&nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readView(JdbcDatabaseSnapshotGenerator.java:166)  
&nbsp;&nbsp;&nbsp; … 7 more  
  
Thanks.

---

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [April 14, 2011, 5:41am UTC](https://forum.liquibase.org/t/error-using-generatechangelog-on-existing-database/1228/2 "2011-04-14T05:41:00Z")

</div>

Thanks for the reply…no the command does not return any result  
  
mysql\> SELECT VIEW\_DEFINITION FROM INFORMATION\_SCHEMA.VIEWS WHERE TABLE\_NAME = ‘CdsClientForm’ AND TABLE\_SCHEMA=‘oscar\_eyeform’;  
Empty set (0.02 sec)  
  
There’s no views associated with this table…or for that matter, with any of my tables.

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [April 14, 2011, 5:41am UTC](https://forum.liquibase.org/t/error-using-generatechangelog-on-existing-database/1228/3 "2011-04-14T05:41:00Z")

</div>

I’ve done a bit of looking and can’t tell off hand why you are getting the error. If you run

Nathan
