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

Error excecuting Batch in JdbcStringBasedStore with Oracle DB

XMLWordPrintable

    • Hide

      Use infinispan-cachestore-jdbc with oracle DB and delete entries in batch job in the cache with infinispan version 12.1.10.

      Show
      Use infinispan-cachestore-jdbc with oracle DB and delete entries in batch job in the cache with infinispan version 12.1.10.

      When using the infinispan-cachestore-jdbc with a Oracle DB and JDBC driver I get an exception when deleting entries from the cache in a batch.

      I have identified the problematic section:

      https://github.com/infinispan/infinispan/blob/12.1.x/persistence/jdbc/src/main/java/org/infinispan/persistence/jdbc/stringbased/JdbcStringBasedStore.java#L754

      At this code point you can see that the PreparedStatement is added with batch jobs, but then executed with executeUpdate. But it should be executeBatch. In the case of Oracle DB you will get an error saying:

      java.sql.SQLException: Fehler bei Batchverarbeitung aufgetreten: batch must be either executed or cleared

      Also in MariaDB only the first batch job will be executed.

      I know that this is fixed in infinispan 13. But could you please fix it in the next 12.1.X version? We are bound to this version at the moment.

      I have attached the stacktrace.txt

       

              wburns@redhat.com Will Burns
              thaefner Tobias Häfner
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: