Quantcast
Channel: Liquibase Forums
Viewing all 2993 articles
Browse latest View live

mysql tagDatabase operation problem

$
0
0
Good morning,

I wrote on the past on the subject but with unfortunately with no answer. I'm currently testing your product with mysql and I have a problem the tagging process ( I did not test it but faily sure that the problem exist for other rdbms).

I'm opening this topic with the same idea behind the following post  :

You stated that the issue should be fixed on 2.0.2 and I' currently using the version 3.1 and I still have problem of changeset's tags information beeing written were it shouldn't have.

Note, from what I see the problem is with how the tag is set and the sql command that is sent. The fact is that you are using the dataexecuted to manage what record should be tagged and in the databasechangelog table the dateexecuted, datetime field precision is the second therefore multiple statement can be run within that seconds.

Below is the the actual sql command the following sample code end up updating multiple rows and written to possibly to some other changeset.
UPDATE `DATABASECHANGELOG` SET `TAG` = 'tag-test' WHERE DATEEXECUTED = (SELECT MAX(DATEEXECUTED) FROM (SELECT DATEEXECUTED FROM `DATABASECHANGELOG`) AS X);
I have also joined in this post a changelog including the changesets to reproduce the situation. to sumarrize I have onle changeset indicating the tagdatabase but at the end i got 3 changeset having the actual tag.

I have some possible track of solution, for instance not to use the DATEEXECUTED but rather the ORDEREXECUTED for instance but at the end you will be a lot better to find the correct fix not only for mysql but for other RDBMS.

Could you please assist me. Is there some configuration that I can change ? or some other way to get it to work smoothly with mysql ?
Thanks you in advance.
Ricardo Fonseca http://www.lapresse.ca/

Re : changeset with multiple context

$
0
0
I would prefer not to convert them. Our developers are used to sql files and we don't need db-vendor independence or something like this, so the annotated sql files are a good way for us.
As the simple contexts work there, it would be nice if the combined would also.


Rollback not working using rollback tag

$
0
0
My Changelog xml:

<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd" logicalFilePath="2014_06_dml_WN.xml">
<changeSet author="Raja" id="wn_dml_2014_06.1">
<sql>INSERT INTO TMP_NMOCI VALUES('TESTDATA1','TESTDATA2')</sql>
<rollback>
<sql>DELETE FROM TMP_NMOCI WHERE COLUMN1 = 'TESTDATA1' AND COLUMN2 = 'TESTDATA2'</sql>
</rollback>
</changeSet>
<changeSet author="Raja" id="wn_dml_tag_2014_06.1">
<tagDatabase tag="wn_dml_2014_06.1"/>
</changeSet>
</databaseChangeLog>


I have 2 entries in the databasechangelog table. Now when I run rollback using the tag ''wn_dml_2014_06.1" nothing happens. But when I run the rollback using rollbackcount as 2 it works and both the entries are deleted from databasechangelog and from the table as well. Am I doing anything wrong while creating tag or while doing rollback tag. Please help me on this?

Add rollback tags to liquibase diff

$
0
0
Hi All,
Is there anyway to generate rollback tags to a diffChangelog xml file?

Basically I want to keep a QA Db "insync" with a Dev db.

I want to
1.) Generate the diffs between a machine used for Dev and QA to see which DB changes still needs to be applied in QA.
2.) Generate update sql from the diff file.
3.) Generate rollback sql from the diff file
4.) Use generateChangelog to get the data from base Db and then eyeball what really needs to be taken over to QA.

I've gotten 1 & 2 finished and 4 I've worked with before, but it seems I would need to manually add rollback tags to xml for 3 to work going off what the stacktrace says.

My setup is as follows:
liquibase.properties:
changeLogFile=changelog.xml
driver=oracle.jdbc.OracleDriver
url=jdbc:oracle:thin:@{target_server}:{port}:{schema}
username=kuldev
password=*********
referenceUrl=jdbc:oracle:thin:@{base_server}:{port}:{schema}
referenceUsername=kuldev
referencePassword=********

  1.  C:\Dev\liquibase-3.0.7-bin>liquibase diffChangeLog
  2. C:\Dev\liquibase-3.0.7-bin>liquibase updateSQL > update.sql
  3.  C:\Dev\liquibase-3.0.7-bin>liquibase futureRollbackSQL > rollback.sql
Running above in debug mode I get:


Liquibase futureRollbackSQL Failed: liquibase.exception.RollbackImpossibleException: No inverse to liquibase.change.core.ModifyDataTypeChange created
SEVERE 6/18/14 3:53 PM:liquibase: changelog.xml::1403085941005-81::Adrian (generated): liquibase.exception.RollbackImpossibleException: No inverse to liquibase.change.core.ModifyDataTypeChange created
liquibase.exception.RollbackFailedException: liquibase.exception.RollbackImpossibleException: No inverse to liquibase.change.core.ModifyDataTypeChange created
        at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:429)
        at liquibase.changelog.visitor.RollbackVisitor.visit(RollbackVisitor.java:32)
        at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:64)
        at liquibase.Liquibase.futureRollbackSQL(Liquibase.java:531)
        at liquibase.Liquibase.futureRollbackSQL(Liquibase.java:483)
        at liquibase.integration.commandline.Main.doMigration(Main.java:909)
        at liquibase.integration.commandline.Main.main(Main.java:133)
Caused by: liquibase.exception.RollbackImpossibleException: No inverse to liquibase.change.core.ModifyDataTypeChange created
        at liquibase.change.AbstractChange.generateRollbackStatementsFromInverse(AbstractChange.java:400)
        at liquibase.change.AbstractChange.generateRollbackStatements(AbstractChange.java:373)
        at liquibase.database.AbstractJdbcDatabase.executeRollbackStatements(AbstractJdbcDatabase.java:1530)
        at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:417)
        ... 6 more

If anyone has gone through a similar exercise I would be interested in the strategies you followed.
Any suggestions welcomed.

Regards
Adrian

Re : Add rollback tags to liquibase diff

$
0
0
Yes, you are correct - either you or (ideally) the person who initially created the change would need to write the rollback steps for anything that can't be automatically rolled back. 

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

precondition problem mysql

$
0
0

Hi

I am having a problem with this changeset

<changeSet author="author" id="1">
 <preConditions onFail="MARK_RAN">
     <dbms type="PostgreSQL"/>
 </preConditions>

    <createSequence incrementBy="1"
            sequenceName="startpoint"
            startValue="1"/>
</changeSet>


When I run this against MySQL database, it still tries to run. Is this a known bug.


John

Is switching SQL Server databases during a liquibase changeset and the subsequent unreleased lock a bug?

$
0
0
Hi,

I was using the 3.1.1 Maven Liquibase Plugin (I've since upgraded to 3.2.0 and still have the same problem) with SQL Server, and ran into an issue where the liquibase lock was not released due to a change of databases in the middle of a changeset.

The scenario was this:
  • Liquibase runs and successfully acquires the lock (say in database_a)
  • Changeset runs and during the changeset, the database schema is changed using a "use database_b"
  • Changeset completes (successfully or otherwise) and liquibase releases the lock in database_b but the lock is still acquired in database_a
  • An attempt to repeat the process causes the "Waiting for changelog lock" message to be repeated as database_a is still locked.
Now, it might be a feature that liquibase allows you to switch database in a changeset, as long as the database is switched back to database_a at the end, but of course, that will be a problem if there is an error half way through the change set (i.e before you change back).

In any case, when liquibase releases the lock, I'd have expected it to check that it was still locked with the correct dates etc that it set when it locked it. This way, at least you'd be alerted to a potential problem, rather than blindly reporting: "liquibase: Successfully released change log lock" when that clearly isn't true.

If someone can confirm whether they agree this is a bug or not, and I'll raise a Jira :)

Many thanks,

Paul.

How to tag a database with liquibase 3.2.0 ?

$
0
0
Hi,

i am doing my first steps with liquibase and oracle. Changing the database is fine, but I am not able to tag the database.

First I tried the command line, but the tag command returned  an "Unexprected error with Unknown reason (NullPointerException).

Then I tried <tagDatabase> in my changelog.
The result was that only the last changeset gets the tag added. I found that this is the way liquibase works. But rolling back this tag has no effect. The database remains unchanged. Table databaseChangelog still contains the entry and the tag.

When I roll the changes back using the rollbackCount command, everything works fine.

Could someone please tell me, what I am doing wrong. Or is there a problem with this version ?

Kind regards,
Michael



Re : Is switching SQL Server databases during a liquibase changeset and the subsequent unreleased lock a bug?

$
0
0
It seems to me that you should just change the sql so that there is a "use database_a" in the sql. 

As to whether Liquibase should keep track of the locks that it acquires and then verify that the lock released is the same as the one acquired, it is my opinion that such a feature does have value. As you said, it would alert you to a problem earlier. I wouldn't exactly call it a bug that Liquibase doesn't already do this, though.

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

Re : How to tag a database with liquibase 3.2.0 ?

$
0
0
This is the intended behavior. When you roll back and use a tag, Liquibase rolls back everything that changed after the tag. It does not remove the tag itself. The intent is that you would mark a set of changes with, for example, "Version1", and then deploy those changes. If you then came along a week later to apply a set of changes "Version1-1", and there was a problem with that deploy, you could then roll back to "Version1"

It would be helpful to file a bug with repro steps for the null pointer exception case you experienced. 

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

Re : Is switching SQL Server databases during a liquibase changeset and the subsequent unreleased lock a bug?

$
0
0
Thanks Steve,

The actual fix for me was that I had to remove the "use" statement altogether. It was a schoolboy cut and paste error that it was in there in the first place. 

However, I'm not sure I agree that it isn't a bug. The fact that liquibase reports "Successfully released change log lock" when blatantly no lock had been set on database_b, and the original lock is left in place on database_a surely isn't right?. However, I didn't just raise a Jira straight away, as I wanted to canvas opinions such as these first, thanks!

GenerateChangeLog + Oracle column order for tables (v3.1.1)

$
0
0
I'm noticing that the generated changelog does not appear to be absolutely faithful in column ordering for tables on an Oracle DB.  I don't fully know my way around the code yet, but this method:
liquibase.snapshot.JdbcDatabaseSnapshot.CachingDatabaseMetaData.getColumns(...).new SingleResultSetExtractor() {...}.oracleQuery(boolean)
appears to be what feeds the changelog generator.  That method makes the assumption that ALL_TAB_COLS outputs rows in order of column order.  This is not the case and shold not be relied upon.  I have about 100 columns to reorder in the generated changelog now.  100 out of 2277 ain't bad, I suppose. 
 
Is this an outstanding bug?  I searched Jira but couldn't find anything.

Upgrading from 2.0.5 to 3.2.0

$
0
0
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:

    <changeSet author="tnelson" id="devdata-defaultuser" context="dev,test">
        <preConditions onFail="MARK_RAN">
            <dbms type="h2"/>
        </preConditions>
         <sql splitStatements="true">
            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;
        </sql>
    </changeSet>


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

Re : Upgrading from 2.0.5 to 3.2.0

$
0
0
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:

 <changeSet author="tnelson" id="devdata-defaultuser" context="dev,test">
        <preConditions onFail="MARK_RAN">
            <dbms type="h2"/>
        </preConditions>
         <sql splitStatements="true">
            SET REFERENTIAL_INTEGRITY FALSE;

            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');

            SET REFERENTIAL_INTEGRITY TRUE;
        </sql>
    </changeSet>

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

Re : Upgrading from 2.0.5 to 3.2.0

$
0
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

Re : Upgrading from 2.0.5 to 3.2.0

$
0
0
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/

Re : Upgrading from 2.0.5 to 3.2.0

$
0
0
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]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1206)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1189)
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:518)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:70)
at liquibase.Liquibase.update(Liquibase.java:195)
at liquibase.Liquibase.update(Liquibase.java:174)
at liquibase.integration.commandline.Main.doMigration(Main.java:992)
at liquibase.integration.commandline.Main.run(Main.java:170)
at liquibase.integration.commandline.Main.main(Main.java:89)
Caused by: org.h2.jdbc.JdbcSQLException: 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]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at value.Value.convertTo(Value.java:902)
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:277)
at org.h2.table.Table.validateConvertUpdateSequence(Table.java:726)
at org.h2.command.dml.Insert.insertRows(Insert.java:152)
at org.h2.command.dml.Insert.update(Insert.java:115)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:186)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:160)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:310)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
... 11 more
Caused by: java.lang.NumberFormatException: For input string: "0.0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at org.h2.value.Value.convertTo(Value.java:852)
... 21 more
DEBUG 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: Release Database Lock
DEBUG 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: Executing UPDATE database command: UPDATE PUBLIC.DATABASECHANGELOGLOCK SET LOCKED = FALSE, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1
INFO 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: Successfully released change log lock
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]

SEVERE 6/25/14 11:04 AM: liquibase: com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson: 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.MigrationFailedException: Migration failed for change set com/starpoint/instihire/db/changelog/db.20120322-reference-data.xml::devdata-defaultuser::tnelson:
     Reason: 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]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:554)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43)
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:70)
at liquibase.Liquibase.update(Liquibase.java:195)
at liquibase.Liquibase.update(Liquibase.java:174)
at liquibase.integration.commandline.Main.doMigration(Main.java:992)
at liquibase.integration.commandline.Main.run(Main.java:170)
at liquibase.integration.commandline.Main.main(Main.java:89)
Caused by: 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]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122)
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1206)
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1189)
 at liquibase.changelog.ChangeSet.execute(ChangeSet.java:518)
... 7 more
Caused by: org.h2.jdbc.JdbcSQLException: 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]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.value.Value.convertTo(Value.java:902)
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:277)
at org.h2.table.Table.validateConvertUpdateSequence(Table.java:726)
at org.h2.command.dml.Insert.insertRows(Insert.java:152)
at org.h2.command.dml.Insert.update(Insert.java:115)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:186)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:160)
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:310)
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
... 11 more
Caused by: java.lang.NumberFormatException: For input string: "0.0"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:492)
at java.lang.Integer.parseInt(Integer.java:527)
at org.h2.value.Value.convertTo(Value.java:852)
... 21 more

Re : Upgrading from 2.0.5 to 3.2.0

$
0
0
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/

https://forum.liquibase.org wrong SSL certificate

$
0
0
Trying to login to forum.liquibase.org I get the following error:


While I can manually "proceed anyway", it seems the SSL configuration need to be fixed.

Upgrade 3.1.1 to 3.2.0 throws liquibase.exception.ValidationFailedException: Validation Failed: 1 change sets check sum .. is now: ..

$
0
0
I have an issue upgrading from 3.1.1 to 3.2.0 due to mismatched checksum, although the changeset file is unchanged:
  1. liquibase.exception.ValidationFailedException: Validation Failed:
  2.      1 change sets check sum
  3.           id/co/bippo/inventory/inventorybalance.liquibase.xml::table_inventorybalance::rudi is now: 7:534688088153d7898ff09f460e66a954
  4.     at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:181) ~[liquibase-core-3.2.0.jar:na]
(complete stacktrace is attached)

The contents of databasechangelog generated by 3.1.1 is:
  1. COPY databasechangelog (id, author, filename, dateexecuted, orderexecuted, exectype, md5sum, description, comments, tag, liquibase) FROM stdin;
  2. table_payment rudi id/co/bippo/payment/payment.liquibase.xml 2014-06-30 04:11:35.715873+00 1 EXECUTED 7:5c20fec49bc4d65e3a67417a758fcdef sql (x2), createTable, createIndex (x12), sql \N 3.1.1
  3. table_booking_and_bookingline atang id/co/bippo/booking/booking.liquibase.xml 2014-06-30 04:11:36.546582+00 2 EXECUTED 7:f72012734b7aba2c447a988ea0db70d1 sql, createTable, sql, createIndex (x7), createTable, addForeignKeyConstraint, createIndex (x4) \N 3.1.1
  4. table_inventorybalance rudi id/co/bippo/inventory/inventorybalance.liquibase.xml 2014-06-30 04:11:38.805418+00 3 EXECUTED 7:4dadd82b02b0ec3cfe0902f1448fdb33 sql, createTable, createProcedure, sql, createIndex (x13) \N 3.1.1
  5. \.
In short, for the same file inventorybalance.liquibase.xml (UTF-8 encoding, but all characters are ASCII anyway, no BOM, and standard LF line endings) checksums are different:
3.1.1 checksum: 7:4dadd82b02b0ec3cfe0902f1448fdb33
3.2.0 checksum: 7:534688088153d7898ff09f460e66a954

This seems to be related to:
  1. CORE-1578
  2. CORE-1776
However CORE-1578 relates to Windows.

CORE-1776 claims to use system independent checksums. My sample file is the most basic as it can get, I'm pretty sure this file should have consistent checksum regardless of platform. If it's intentional change in checksum algorithm, then it should be featured more prominently in the 3.2.0 release announcement with steps how to migrate.

At least one other user (Nei Barbosa in the blog comment) also experienced this problem.

Is this is a bug? If so, let me know and I'll file a JIRA. Thank you.
Viewing all 2993 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>