Code Monkey home page Code Monkey logo

autopatch's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

autopatch's Issues

can't create Patch table with postgres 9.2

I am using autopatch 1.4.2 with postgres 9.2

When autopatch startsand try to create the patch table, I have the following exception :

java.lang.RuntimeException: com.tacitknowledge.util.migration.MigrationException: Unable to create patch table
at com.tacitknowledge.util.migration.jdbc.PatchTable.createPatchStoreIfNeeded(PatchTable.java:136)
at com.tacitknowledge.util.migration.jdbc.PatchTable.isPatchStoreLocked(PatchTable.java:223)
at com.tacitknowledge.util.migration.jdbc.JdbcMigrationLauncher.waitForFreeLock(JdbcMigrationLauncher.java:587)
at com.tacitknowledge.util.migration.jdbc.JdbcMigrationLauncher.lockPatchStore(JdbcMigrationLauncher.java:546)
at com.tacitknowledge.util.migration.jdbc.JdbcMigrationLauncher.doMigrations(JdbcMigrationLauncher.java:477)
at com.tacitknowledge.util.migration.jdbc.JdbcMigrationLauncher.doMigrations(JdbcMigrationLauncher.java:136)
.....
Caused by: org.postgresql.util.PSQLException: ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc
de la transaction
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:381)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at com.tacitknowledge.util.migration.jdbc.PatchTable.createPatchStoreIfNeeded(PatchTable.java:128)
... 29 more

It says the transaction is canceled, all statements are canceled until the end of the block.
It seems that as the first query in PatchTable (line 103) fails, the opened connection is blocked and the second statement that creates the table fails.
As a fix, autopatch should either rolllback() (but specific code to postgres) or execute the second statement in a newly opened connection.

Thanks for your help.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.