# Mysql GenerateChangelog of data in xml format error

**URL:** <https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780>\
**Category:** Liquibase Development\
**Created:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780 "2013-11-19T16:40:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@adrian](https://forum.liquibase.org/u/adrian)\
**Post date:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/1 "2013-11-19T16:40:00Z")

</div>

Hi All,  
Ran the following command, but not sure how to pinpoint what is going wrong.  
Running against a local Mysql database.  
  
C:\Dev\liquibase-3.0.7-bin\>liquibase --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://localhost:3306/kmmdemo --username=kmmdemo --password=kmmdemo --changeLogFile=output2.xml --diffTypes=data generateChangeLog --logLevel=DEBUG  
  
**Liquibase generateChangeLog Failed: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 6 to TIMESTAMP.**  
  
Anybody have idea on how I can figure out which table it has issue with?  
Thought maybe logLevel would give more info, but apparently not.  
Thanks  
Adrian

---

<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:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/2 "2013-11-19T16:40:00Z")

</div>

Are you getting any stacktrace in the debug output?  
  
Nathan

---

<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:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/3 "2013-11-19T16:40:00Z")

</div>

Would the debug output also be generated in the command line?  
Or is it output to a file? Sorry I’m new to liquibase.  
  
Only got that oneliner in my console output.

---

<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:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/4 "2013-11-19T16:40:00Z")

</div>

It should go to output. I think the problem is that the --logLevel=debug flag goes before the generateChangeLog command, not after.

Nathan

---

<div class="post-metadata">

**Author:** ![un1384849381986r11id](https://avatars.discourse-cdn.com/v4/letter/u/ee59a6/32.png) [@un1384849381986r11id](https://forum.liquibase.org/u/un1384849381986r11id)\
**Post date:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/5 "2013-11-19T16:40:00Z")

</div>

Yeah I moved the loglevel  
Following output now:

1. C:\Users\Carbon\>liquibase --driver=com.mysql.jdbc.Driver --url=jdbc:mysql://localhost:3306/kmmdemo --username=kmmdemo --password=kmmdemo --changeLogFile=output2.xml --logLevel=DEBUG --diffTypes=data generateChangeLog
2. DEBUG 11/21/13 8:37 AM:liquibase: Connected to kmmdemo@localhost@jdbc:mysql://localhost:3306/kmmdemo
3. DEBUG 11/21/13 8:37 AM:liquibase: Setting auto commit to false from true
4. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_catalog\_item\_live\_v’ and table\_schema='kmmdemo’
5. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_customer\_return\_lines\_v’ and table\_schema='kmmdemo’
6. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘sbval\_v’ and table\_schema='kmmdemo’
7. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_stock\_balance\_v’ and table\_schema='kmmdemo’
8. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘qtytbl\_v’ and table\_schema='kmmdemo’
9. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_awaiting\_shipment\_v’ and table\_schema='kmmdemo’
10. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_stock\_reordered\_v’ and table\_schema='kmmdemo’
11. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘reord\_v’ and table\_schema='kmmdemo’
12. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_reorder\_summary\_v’ and table\_schema='kmmdemo’
13. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_checkin\_correction\_v’ and table\_schema='kmmdemo’
14. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_checkin\_receivable\_v’ and table\_schema='kmmdemo’
15. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_mass\_maint\_stock\_v’ and table\_schema='kmmdemo’
16. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_stock\_ordered\_v’ and table\_schema='kmmdemo’
17. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘mm\_vendor\_return\_lines\_v’ and table\_schema='kmmdemo’
18. DEBUG 11/21/13 8:38 AM:liquibase: Executing QUERY database command: select view\_definition from information\_schema.views where table\_name=‘odett\_v’ and table\_schema='kmmdemo’
19. INFO 11/21/13 8:38 AM:liquibase: output2.xml exists, appending
20. DEBUG 11/21/13 8:38 AM:liquibase: MissingObjectChangeGenerator type order:&nbsp;&nbsp;&nbsp;&nbsp; liquibase.structure.core.Schema&nbsp;&nbsp;&nbsp; liquibase.structure.core.Table&nbsp;&nbsp;&nbsp; liquibase.structure.core.Data&nbsp;&nbsp;&nbsp; liquibase.structure.core.ForeignKey&nbsp;&nbsp;&nbsp; liquibase.structure.core.Index&nbsp;&nbsp;&nbsp; liquibase.structure.core.PrimaryKey&nbsp;&nbsp;&nbsp; liquibase.structure.core.View
21. **Liquibase generateChangeLog Failed: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 6 to TIMESTAMP.**
22. SEVERE 11/21/13 8:38 AM:liquibase: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 6 to TIMESTAMP.
23. liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 6 to TIMESTAMP.
24. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.core.MissingDataChangeGenerator.fixMissing(MissingDataChangeGenerator.java:206)
25. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44)
26. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:95)
27. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:140)
28. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:121)
29. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:67)
30. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:50)
31. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:173)
32. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:791)
33. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.integration.commandline.Main.main(Main.java:133)
34. Caused by: java.sql.SQLException: Cannot convert value ‘0000-00-00 00:00:00’ from column 6 to TIMESTAMP.
35. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
38. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
39. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1339)
40. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.BufferRow.getTimestampFast(BufferRow.java:578)
41. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:6754)
42. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:6073)
43. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.ResultSetImpl.getObject(ResultSetImpl.java:5029)
44. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at liquibase.util.JdbcUtils.getResultSetValue(JdbcUtils.java:83)
45. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at **liquibase.diff.output.changelog.core.MissingDataChangeGenerator.fixMissing(MissingDataChangeGenerator.java:180)**
46. **&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; … 9 more**
47. **Caused by: java.sql.SQLException: Value ‘[B@4c272961’ can not be represented as java.sql.Timestamp**
48. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1075)
49. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:989)
50. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:984)
51. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:929)
52. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1037)
53. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; … 15 more

  
  
For more information, use the --logLevel flag

---

<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:** [November 19, 2013, 4:40pm UTC](https://forum.liquibase.org/t/mysql-generatechangelog-of-data-in-xml-format-error/3780/6 "2013-11-19T16:40:00Z")

</div>

Looks like we’re running into&nbsp;[http://stackoverflow.com/questions/11133759/0000-00-00-000000-can-not-be-represented-as-java-sql-timestamp-error](http://stackoverflow.com/questions/11133759/0000-00-00-000000-can-not-be-represented-as-java-sql-timestamp-error)

Adding the&nbsp;parameter would get you past the error, but you will have to reset the correct zero date back. It looks like the problem is with rows with a zero timestamp value. Do you know how many rows that is in your database?  
  
Nathan
