Upgrading from 2.0.5 to 3.2.0

That was an excellent idea, and it only makes the result more interesting:


Unexpected error running Liquibase: Error executing SQL INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’): Data conversion error converting “0.0”; SQL statement:

INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’) [22018-176]


In 2.0.5 I had “verbose true” in a liquibase properties file, which I had to remove because 3.2.0 doesn’t seem to support.  Do you know off the top of your head how to enable more verbose logging?  I’ll try a few google searches.


Thanks for your time.


Tony

Added the logLevel=debug worked perfectly.  I managed to get a stack trace.  Now it gets even stranger.  It reads to me like the exception is happening in H2, not in LiquiBase.  The problem I have with that is the only thing I’m changing is the version of LiquiBase, H2 is version 1.3.176 in both cases.


Here is the full exception I’m getting, do you see anything else?


Thanks for your time.


Tony


DEBUG 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.changelog-master.xml: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: Executing EXECUTE database command: INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’)

SEVERE 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.changelog-master.xml: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: Change Set com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson failed.  Error: Error executing SQL INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’): Data conversion error converting “0.0”; SQL statement:

INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’) [22018-176]

liquibase.exception.DatabaseException: Error executing SQL INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’): Data conversion error converting “0.0”; SQL statement:

INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (1, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            2, ‘2000-01-01’, 3, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’) [22018-176]

… 21 more


I’m a bit behind the upgrade curve, but I thought I would see if 3.2.0 would be any faster than 2.0.5 is for me.


I run Liquibase from Gradle.  I currently use H2 for dev, and Postgres for prod.


I changed the version 2.0.5 to 3.2.0, and ran my script to create a new dev db from scratch.


This changelog:


   

       

           

       

         

            SET REFERENTIAL_INTEGRITY FALSE;


            INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (0, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            0, ‘2000-01-01’, 0, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’);


            SET REFERENTIAL_INTEGRITY TRUE;

       

   



Now produces this error:


Unexpected error running Liquibase: Error executing SQL INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (0, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            0, ‘2000-01-01’, 0, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’): Data conversion error converting “0.0”; SQL statement:

INSERT INTO USERS

            (userid, companyid, useremail, firstname, lastname, password,

            createuserid, createdate, updateuserid, updatedate, forcepasswordchange, wizardcomplete,

            sendnewjobnotification, sendmodifiedjobnotification, active)

            VALUES

            (0, 86, ‘instihire@starpoint.com’, ‘System’, ‘User’, ‘INVALID’,

            0, ‘2000-01-01’, 0, ‘2000-01-01’, ‘N’, ‘Y’, ‘N’, ‘N’, ‘N’) [22018-176]


I’m not sure where the “0.0” comes from.  The target table has no non-intergral numeric columns. What else can I do to troubleshoot this issue?


Thanks in advance

Tony Nelson

I’m not sure what the problem is, but I would try diagnosing it further by replacing all the 0 values with different values (1, 2, 3, etc.), so you could see which column is the problem. So something like this:


Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

In you are using Gradle, I think you can specify --logLevel=debug on the command line. You can also set logLevel=debug in your liquibase.properties file.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

That is very strange - all I can think of is to debug through it and see where that 0.0 comes from. 

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/