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

ClassCastException with Oracle string-keyed-jdbc-store

XMLWordPrintable

      A string-keyed-jdbc-store persisting to an Oracle database does not marshall the entry's value before storing, so it gets a ClassCastException when reading the data back in and trying to unmarshall it.

      java.lang.ClassCastException: org.infinispan.query.remote.impl.indexing.ProtobufValueWrapper cannot be cast to org.infinispan.persistence.spi.MarshalledValue
              at org.infinispan.persistence.jdbc.impl.table.AbstractTableManager.entryFromResultSet(AbstractTableManager.java:618)
      

      Root cause is that org.infinispan.persistence.jdbc.impl.table.OracleTableManager overrides prepareValueStatement and does NOT marshall the data before putting it into the DB like the overriden AbstractTableManager's impl does.

      org.infinispan.persistence.jdbc.impl.table.DB2TableManager also has the same bug.

            wburns@redhat.com Will Burns
            wburns@redhat.com Will Burns
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: