Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8410089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:05:10+00:00 2026-06-10T00:05:10+00:00

I’m making Liquibase migration using groovy script. I have a code like def migrate()

  • 0

I’m making Liquibase migration using groovy script.

I have a code like

def migrate() {

    def changeLog = "com/cadence/mdv/ngv/db.changelog.xml"
    Sql db = Sql.newInstance(profile.dbUrl, profile.dbUser, profile.dbPassword, profile.dbDriver)


    Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(db.connection))


    def liquibase = new Liquibase(changeLog
            , new ClassLoaderResourceAccessor()
            , database
    )
    liquibase.update(null)

}

But I receive exception, telling that some table does not exists

liquibase.exception.MigrationFailedException: Migration failed for change set com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-31::pavelber (generated):
 Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE APP.ACTION_ATTRIBUTES ADD CONSTRAINT FKD1111B00C05F2ED6 FOREIGN KEY (RUN_ID) REFERENCES APP.RUNS (ID) ON UPDATE NO ACTION ON DELETE NO ACTION: 'ALTER TABLE' cannot be performed on 'APP.ACTION_ATTRIBUTES' because it does not exist.:
      Caused By: Error executing SQL ALTER TABLE APP.ACTION_ATTRIBUTES ADD CONSTRAINT FKD1111B00C05F2ED6 FOREIGN KEY (RUN_ID) REFERENCES APP.RUNS (ID) ON UPDATE NO ACTION ON DELETE NO ACTION: 'ALTER TABLE' cannot be performed on 'APP.ACTION_ATTRIBUTES' because it does not exist.:

I see that in the list of my changesets that failed the first changeset with ALTER TABLE, it looks like all previous changesets did not work, but I see in the console:

INFO 8/20/12 4:08 PM:liquibase: Successfully acquired change log lock
INFO 8/20/12 4:08 PM:liquibase: Creating database history table with name: DATABASECHANGELOG
INFO 8/20/12 4:08 PM:liquibase: Reading from DATABASECHANGELOG
INFO 8/20/12 4:08 PM:liquibase: Reading from DATABASECHANGELOG
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-    changelog.xml::1345376497537-1::pavelber (generated) ran successfully in 56ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-2::pavelber (generated) ran successfully in 29ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-3::pavelber (generated) ran successfully in 42ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-4::pavelber (generated) ran successfully in 29ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-5::pavelber (generated) ran successfully in 190ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-6::pavelber (generated) ran successfully in 32ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-7::pavelber (generated) ran successfully in 26ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-8::pavelber (generated) ran successfully in 23ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-9::pavelber (generated) ran successfully in 15ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-10::pavelber (generated) ran successfully in 31ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-11::pavelber (generated) ran successfully in 26ms
INFO 8/20/12 4:08 PM:liquibase: ChangeSet com/cadence/mdv/ngv/initial-changelog.xml::1345376497537-12::pavelber (generated) ran successfully in 54ms
.....

The same changelog is working well while running from command line, so I suppose that the problem is in transaction definitions or something like this.

How to solve this problem?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:05:12+00:00Added an answer on June 10, 2026 at 12:05 am

    It would be helpful to know what profile.dbUrl is, and possibly profile.dbUser, too.

    The most common reasons for a table not existing in a Derby database are because Derby, being an embedded database engine, can have multiple copies of the database all over the place, and it’s easy to get confused and use a different database than you think you are:

    1. Your database is accessed via a relative file path, and your current directory has changed, causing Derby to access a different database
    2. Your database is accessed via a different user, and the user name implicitly defines a schema, and so the tables are not found, because your user name has changed.
    3. Your database is an in-memory database, and those don’t persist beyond the lifetime of your application, so each time you run it you start with a fresh database with no tables in it.
    4. Your application creates all its tables and does all its work in one giant transaction, and doesn’t commit that transaction, causing all your work, including all your table creations, to be rolled back when your application exits.

    There are other possible reasons, but these are some common ones.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have thousands of HTML files to process using Groovy/Java and I need to
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a view passing on information from a database: def serve_article(request, id): served_article
I'm making a simple page using Google Maps API 3. My first. One marker
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.