Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

MySQL issue when upgrading #2860

david.hoffman ·
I have a very old install of QuickBuild 3.1.11.

I was able to restore a backup on a new machine, then do a migrate to the version 5.1.29 (using hsql), then change the hibernate.conf file to MySQL.

Upon attempting to restore my backup, I get the following error:

2014-06-19 09:20:52,893 [Thread-67] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 0, SQLState: 22001
2014-06-19 09:20:52,893 [Thread-67] ERROR org.hibernate.util.JDBCExceptionReporter - Data truncation: Incorrect datetime value: '' for column 'QB_STATUS_DATE' at row 1
2014-06-19 09:20:52,893 [Thread-67] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.DataException: could not insert: [com.pmease.quickbuild.model.Configuration]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:102)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2454)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2874)
at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
at com.pmease.quickbuild.entitymanager.impl.DefaultDataManager.importData(DefaultDataManager.java:991)
at com.pmease.quickbuild.Quickbuild.importData(Quickbuild.java:902)
at com.pmease.quickbuild.bootstrap.Restore$1.execute(Restore.java:71)
at com.pmease.quickbuild.Quickbuild$3.run(Quickbuild.java:622)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.sql.BatchUpdateException: Data truncation: Incorrect datetime value: '' for column 'QB_STATUS_DATE' at row 1
at com.mysql.jdbc.ServerPreparedStatement.executeBatch(ServerPreparedStatement.java:647)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
at org.hibernate.jdbc.BatchingBatcher.addToBatch(BatchingBatcher.java:56)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2434)
... 13 more

I have also tried just restoring the backup from the original machine directly into mysql on the new machine and it fails with the same error at the same point.

Any help would be greatly appreciated.
  • replies 3
  • views 2014
  • stars 0
robinshen ADMIN ·
Can you please send your backup to [robin AT pmease DOT com] so that I can check what might be wrong?
david.hoffman ·
Robin,

Thank you very much for the assistance!

I am using MySQL 5.6.19 and apparently the stock MySQL JDBC driver needs to be updated.

At your recommendation, I downloaded the latest MySQL jdbc driver (v5.1.31) from http://www.mysql.com/downloads/connector/j/ After extracting it, I put the jar file in the plugins folder and removed the version that was already there (v3.1.12).

Once I did that, the restore went off without a hitch!

<!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
robinshen ADMIN ·
Thanks for the feedback. We will also emphasize this in "conf/hibernate.properties".