Unable to work through tutorial (ValidationFailedException)

I’m trying to get through the oracle tutorial for liquibase (updating files to the 2.0 version of liquibase and using mysql as dbms)

I’ve stoped on the Step 7, cause of ValidationFailedException on trying to execute lb_update batch-script.
Validation of the file looks pretty strange:

    Validation Error:
I would expect more information about a validation error. It looks like a bug. The update command produces following output:
    INFO 17.01.11 09:58:liquibase: Successfully acquired change log lock INFO 17.01.11 09:58:liquibase: Reading from `DATABASECHANGELOG` INFO 17.01.11 09:58:liquibase: Reading from `DATABASECHANGELOG` INFO 17.01.11 09:58:liquibase: Successfully released change log lock Liquibase Update Failed: Validation Failed:     2 changes have validation failures           columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)           columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)

    SEVERE 17.01.11 09:58:liquibase: Validation Failed:
        2 changes have validation failures
              columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)
              columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)

    liquibase.exception.ValidationFailedException: Validation Failed:
        2 changes have validation failures
              columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)
              columnDataType is required, v001/2009-10-16-102.xml::1::jsmith::(Checksum: 3:b9e012def9932cf04f45c992283e45be)

    at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:138)
    at liquibase.Liquibase.update(Liquibase.java:110)
    at liquibase.integration.commandline.Main.doMigration(Main.java:686)
    at liquibase.integration.commandline.Main.main(Main.java:115)</ol>
    

    I’ve attached the version of the project I use (without mysql driver).

I saw you had posted another issue with the tutorial.  Have you gotten past this issue?

The reason is because mysql requires columnDataType but oracle does not.

Nathan

Unfortunately not.

I’ve posted to this topic, but my post was marked as spam and disapeared.

I opened your file, and though I don’t know what is wrong I do have a suggestion to help you track down the problem.  

My suggestion is a strategy for writing changesets, Namely your should only have one statement per changeset.   What this gives you is 1. When liquibase has a problem it points directly at the problem instead  of in the general area.   2.  It makes it so if a changeset blows up half way through you don’t have to worry about how your rollback statement is supposed to handle a partially executed changeset.

So I have rewritten your xml file.   Try this new xml (which is yours just put into seperate change sets) and tell us which changeset is having the problem.

                                                                                               

I’ve tryed it with no effect. It is still “not valid”.

I’ve got the latest version of liquibase from subversion and made some debugging. I’ve used MsSQL Server for this time.

I’ve got an error message, that Double doesn’t support precision for this server type. I’ve changed double(7,2) to double in the column type and it works now.

I haven’t tested it under MySQL after that.

I have also seen this error some times. What my observation is, if you run a change set there will be one entry in DATABASECHANGELOG TABLE related to that changelog file. If you edit the same file and try to run it again we will get this validation error.

 

Solution for this is, do a rollback of the changed files and then try to run the change logs again. This will solve the issue.