leprinco
unread,Dec 19, 2012, 3:50:06 PM12/19/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to autopat...@googlegroups.com
Don't know if this group is active, I try....
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.
As a workarround for the moment, I am obliged to create the patch table manually :-(
Olivier