Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2023

JDBC stores fail to create tables using XA datasources when a TX is active

XMLWordPrintable

      I am seeing the following error logged in server.log:

      Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
      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:512)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:374)
      at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:302)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_23]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_23]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_23]
      at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_23]
      at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:455)
      at $Proxy49.executeUpdate(Unknown Source) at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:371)
      at org.infinispan.loaders.jdbc.TableManipulation.executeUpdateSql(TableManipulation.java:154) [infinispan-cachestore-jdbc-5.1.2.FINAL.jar:5.1.2.FINAL]
      ... 154 more

      I believe it is down to the code suggested in ISPN-1204, which eventually was committed, perhaps not quite working against PostgreSQL 9.0?

      I have attached a debugger to a live JBoss instance with this code running, and set a breakpoint on entry into the tableExists() method. PostgreSQL threw an exception and it was caught, but later on, the attempt to create the table in the TableManipulation.createTable() method resulted in the exception given above. Perhaps the JdbcUtil.safeClose() methods do not work against PostgreSQL 9.0?

            ttarrant@redhat.com Tristan Tarrant
            jimidy Jim Dunkerton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: