1 Reply Latest reply on Dec 29, 2016 9:46 AM by Cristhian Paul Florian La Cruz

    Failed clearing JdbcBinaryStore exception, but really don't know what may cause the problem.

    dungtri pham Newbie

      I am running with Wildfly 10.1.0. I use Oracle express 11.2 to hold the infinispan cache. I have a poller that polls data every 1 minutes and eventually persist the data into the caches. It working fine after start up for about 10 t0 15 minutes then it starts to have the exception:

      2016-09-19 12:11:55,597 TRACE [org.infinispan.persistence.jdbc.binary.JdbcBinaryStore] (persistence-thread--p34-t19) Flushed update batch

      2016-09-19 12:11:55,597 WARN  [org.infinispan.persistence.manager.PersistenceManagerImpl] (expiration-thread--p26-t1) ISPN000026: Caught exception purging data container!: org.infinispan.persistence.spi.PersistenceException: Failed clearing JdbcBinaryStore

          at org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.purge(JdbcBinaryStore.java:341)

          at org.infinispan.persistence.manager.PersistenceManagerImpl.purgeExpired(PersistenceManagerImpl.java:373)

          at org.infinispan.expiration.impl.ExpirationManagerImpl.processExpiration(ExpirationManagerImpl.java:123)

          at org.infinispan.expiration.impl.ExpirationManagerImpl$ScheduledTask.run(ExpirationManagerImpl.java:231)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

          at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)

          at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

          at org.jboss.as.clustering.infinispan.ClassLoaderThreadFactory.lambda$newThread$12(ClassLoaderThreadFactory.java:48)

          at java.lang.Thread.run(Thread.java:745)

      Caused by: java.sql.SQLException: IJ031012: Unable to obtain lock in 60 seconds: org.jboss.jca.adapters.jdbc.local.LocalManagedConnection@d847465

          at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.tryLock(BaseWrapperManagedConnection.java:397)

          at org.jboss.jca.adapters.jdbc.WrappedConnection.lock(WrappedConnection.java:156)

          at org.jboss.jca.adapters.jdbc.WrappedStatement.lock(WrappedStatement.java:138)

          at org.jboss.jca.adapters.jdbc.WrappedResultSet.lock(WrappedResultSet.java:6022)

          at org.jboss.jca.adapters.jdbc.WrappedResultSet.next(WrappedResultSet.java:2679)

          at org.infinispan.persistence.jdbc.binary.JdbcBinaryStore.purge(JdbcBinaryStore.java:280)

          ... 11 more

       

      2016-09-19 12:11:55,597 TRACE [org.infinispan.persistence.jdbc.binary.JdbcBinaryStore] (expiration-thread--p26-t1) Flushing deletion batch

      Here is part of my standalone.xml looks like:

      1) my data source:

      <subsystem xmlns="urn:jboss:domain:datasources:4.0">

                  <datasources>

                      <datasource jndi-name="java:jboss/myapp/jdbc/data" pool-name="MyDbData" enabled="true" use-java-context="true">

                          <connection-url>jdbc:oracle:thin:@localhost:1521:xe</connection-url>

                          <driver>OracleDriver</driver>

                          <pool>

                              <min-pool-size>5</min-pool-size>

                              <initial-pool-size>5</initial-pool-size>

                              <max-pool-size>20</max-pool-size>

                              <flush-strategy>AllGracefully</flush-strategy>

                              <allow-multiple-users>true</allow-multiple-users>

                          </pool>

                          <security>

                              <user-name>dba-cache</user-name>

                              <password>dba-cache</password>

                          </security>

                      </datasource>

                      <drivers>

                          <driver name="OracleDriver" module="my.module.database.oracle"> <!-- this is my module and we don't have issue with set this up -->

                              <xa-datasource-class>oracle.jdbc.driver.OracleDriver</xa-datasource-class> <!-- idid change to the xa driver , but same result-->

                          </driver>

                      </drivers>

                  </datasources>

              </subsystem>

      2) my infinispan cache:

                 <cache-container name="VDSCache" default-cache="vds_idmap">

                      <local-cache name="vds_idmap" jndi-name="java:/cache/vds/idmap">

                          <binary-keyed-jdbc-store data-source="MyDbData" dialect="ORACLE" passivation="false" preload="true" purge="false" shared="true">

                              <binary-keyed-table prefix="cache">

                                  <id-column type="NVARCHAR2(100)"/>

                                  <data-column name="value" type="RAW(2000)"/>

                                  <timestamp-column name="version" type="NUMBER(19)"/>

                              </binary-keyed-table>

                          </binary-keyed-jdbc-store>

                      </local-cache>

                      <local-cache name="vds_metadata" jndi-name="java:/cache/vds/metadata">

                          <string-keyed-jdbc-store data-source="MyDbData" dialect="ORACLE" passivation="false" preload="true" purge="false" shared="true">

                              <string-keyed-table prefix="cache">

                                  <id-column type="NVARCHAR2(50)"/>

                                  <data-column name="value" type="BLOB"/>

                                  <timestamp-column name="version" type="NUMBER(19)"/>

                              </string-keyed-table>

                          </string-keyed-jdbc-store>

                      </local-cache>

                      <local-cache name="vds_congestion" jndi-name="java:/cache/vds/congestion">

                          <binary-keyed-jdbc-store data-source="MyDbData" dialect="ORACLE" passivation="false" preload="true" purge="false" shared="true">

                              <binary-keyed-table prefix="cache">

                                  <id-column type="NVARCHAR2(100)"/>

                                  <data-column name="value" type="BLOB"/>

                                  <timestamp-column name="version" type="NUMBER(19)"/>

                              </binary-keyed-table>

                          </binary-keyed-jdbc-store>

                      </local-cache>

                  </cache-container>