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

JdbcStringBasedCacheStore: ORA-24816 when storing BLOB values > 4000 bytes

    XMLWordPrintable

Details

    • Workaround Exists
    • Hide

      Clone the JdbcStringBasedCacheStore implementation and write my own insert/update SQL in storeLockSafe() in order to get around the issue.

      Show
      Clone the JdbcStringBasedCacheStore implementation and write my own insert/update SQL in storeLockSafe() in order to get around the issue.

    Description

      I've configured a JdbcStringBasedCacheStore with a VARCHAR(4000) key column and a BLOB value column. If I try to store a BLOB value of less than 4000 bytes, everything works fine. If the value is greater, the cache store fails with ORA-24816. This occurs because the BLOB column is not the last one in the PreparedStatement SQL as the Oracle driver requires. My current, sad workaround is to clone the JdbcStringBasedCacheStore implementation and write my own insert/update SQL in storeLockSafe(). This works fine, but obviously isn't ideal from an upgrade point of view. Simply overriding storeLockSafe() isn't an option due to all the private fields.

      Attachments

        Issue Links

          Activity

            People

              remerson@redhat.com Ryan Emerson
              rlscharer Ryan Scharer (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: