grails prepare-test fail

ChrisC's Avatar

ChrisC

04 Aug, 2018 10:11 PM

Hi all,

I'm having trouble building from the src. Environment is as follows:

Java: jdk1.8.0_181
Grails: 2.4.3
Windows 10
PostgreSQL 10

I'm getting an error on the grails prepare-test step:

| Environment set to development.....
Loading configuration files from classpath
Loading database version 4.1
jdbc:postgresql://localhost:5432/jbilling_test jbilling/[no password] (schema: public) (driver org.postgresql.Driver)
dropping all objects in jbilling_test
| Error Error executing script PrepareTest: : liquibase.exception.DatabaseException: liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error getting jdbc:postgresql://localhost:5432/jbilling_test view with liquibase.statement.core.GetViewDefinitionStatement@807bfd3 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)

I won't even mention how much time it took me to get this far, I'd only embarrass myself! Please help, any and all suggestions are welcome.

  1. 1 Posted by vikas bodani on 06 Aug, 2018 08:25 AM

    vikas bodani's Avatar

    Liquibase is unable to drop the db, most likely, because, you are still
    logged-in into the database during that time. So if you log out and run, it
    should work for you.

    *Vikas Bodani*
    www.webdatatechnologies.in

  2. 2 Posted by ChrisC on 07 Aug, 2018 04:30 PM

    ChrisC's Avatar

    Thanks for the response, Vikas, it's really appreciated.

    I've tried hunting down where I might be logged in postgres or jbilling-test, but haven't been able to diagnose where. When I access postgres admin (pgAdmin), it has that "red x" covering localhost, which contains the jbilling-test database, so I'm not locking it up as a resource. I exit the postgres admin tool prior to running grails prepare-test.

    I'm clueless as to where (or even how) I'm logged in. Any suggestions?

  3. 3 Posted by ChrisC on 12 Aug, 2018 06:10 PM

    ChrisC's Avatar

    Solved: Don't use Postgres 10.4. For some reason, at least in my environment, there appears to be some degree of incompatibility. Go back to Postgres 9.6.9, and save yourself hours of frustration!

    Thanks anyway, Vikas.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • pretest.txt 9.07 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Dec, 2018 10:21 AM
10 Dec, 2018 01:50 PM
14 Nov, 2018 09:45 PM
14 Nov, 2018 10:11 AM
06 Nov, 2018 07:08 PM