tag:jbilling.tenderapp.com,2012-10-15:/discussions/problems/876-grails-prepare-test-failjBilling: Discussion 2019-04-05T23:38:59Ztag:jbilling.tenderapp.com,2012-10-15:Comment/458423282018-08-04T22:11:09Z2018-08-04T22:11:12Zgrails prepare-test fail<div><p>Hi all,</p>
<p>I'm having trouble building from the src. Environment is as follows:</p>
<p>Java: jdk1.8.0_181<br>
Grails: 2.4.3<br>
Windows 10<br>
PostgreSQL 10</p>
<p>I'm getting an error on the grails prepare-test step:</p>
<p>| Environment set to development..... Loading configuration files from classpath<br>
Loading database version 4.1<br>
jdbc:postgresql://localhost:5432/jbilling_test jbilling/<a>no password</a> (driver org.postgresql.Driver)<br>
dropping all objects in jbilling_test<br>
| 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.)</p>
<p>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.</p></div>ChrisCtag:jbilling.tenderapp.com,2012-10-15:Comment/458423282018-08-06T08:25:56Z2018-08-06T08:25:56Zgrails prepare-test fail<div><p>Liquibase is unable to drop the db, most likely, because, you are still<br>
logged-in into the database during that time. So if you log out and run, it<br>
should work for you.</p>
<p><em>Vikas Bodani</em> <a href="http://www.webdatatechnologies.in">www.webdatatechnologies.in</a></p></div>vikas bodanitag:jbilling.tenderapp.com,2012-10-15:Comment/458423282018-08-07T16:30:04Z2018-08-07T16:30:05Zgrails prepare-test fail<div><p>Thanks for the response, Vikas, it's really appreciated.</p>
<p>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.</p>
<p>I'm clueless as to where (or even how) I'm logged in. Any suggestions?</p></div>ChrisCtag:jbilling.tenderapp.com,2012-10-15:Comment/458423282018-08-12T18:10:14Z2018-08-12T18:10:16Zgrails prepare-test fail<div><p>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!</p>
<p>Thanks anyway, Vikas.</p></div>ChrisCtag:jbilling.tenderapp.com,2012-10-15:Comment/458423282019-04-05T18:21:30Z2019-04-05T18:21:31Zgrails prepare-test fail<div><p>Dear all, please take a look at this link, it comes with lots of solutions</p>
<p>One notice is instead of downgrading Postgresql which is usually not recommended, consider to upgrade postgresql jdbc driver from 9.3-1102-jdbc41 to 9.4-1202-jdbc41.</p>
<p>Cheers!</p></div>Longtag:jbilling.tenderapp.com,2012-10-15:Comment/458423282019-04-05T23:38:59Z2019-04-05T23:38:59Zgrails prepare-test fail<div><p>Correct. And the right place to do that is BuildConfig.groovy, which<br>
includes the dependency for the driver:</p>
<p>runtime 'org.postgresql:postgresql:9.4.1212'</p>
<p><em>Vikas Bodani</em> <a href="http://www.webdatatechnologies.in">www.webdatatechnologies.in</a></p></div>vikas bodani