-
Bug
-
Resolution: Done
-
Major
-
14.0.29.Final, 15.0.5.Final
-
None
When using infinispan-cachestore-jdbc with a MSSQL Database a SQLServerException is raised when the purgeExpired method is called after the startup.
When using MSSQL the class
org.infinispan.persistence.jdbc.impl.table.TableOperations is used as TableManager. In that class the method initSelectOnlyExpiredRowsSql is overridden and uses getLoadAllRowsSql for the select part of the query. getLoadAllRowsSql selects data and id columns, but not the timestamp column. So there is no index 3.
2024-07-12 06:59:36,809 ERROR [org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore] (blocking-thread--p3-t2) ISPN008001: Failed clearing cache store: com.microsoft.sqlserver.jdbc.SQLServerException: The index 3 is out of range. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:233) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.verifyValidColumnIndex(SQLServerResultSet.java:625) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getterGetColumn(SQLServerResultSet.java:2076) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2105) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getValue(SQLServerResultSet.java:2091) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.getLong(SQLServerResultSet.java:2401) at io.agroal.pool.wrapper.ResultSetWrapper.getLong(ResultSetWrapper.java:160) at org.infinispan.persistence.jdbc.stringbased.JdbcStringBasedStore.lambda$purgeExpired$1(JdbcStringBasedStore.java:337) at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18) at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538) at java.base/java.lang.Thread.run(Thread.java:840)
- is cloned by
-
JDG-7211 SQLServerException in JDBC Store when purgeExpired is called
- Verified