1 Reply Latest reply on Jun 2, 2010 7:08 AM by Manik Surtani

    JdbcBinaryCacheStore & CacheLoaderException

    Franck Garcia Newbie

      I tried to copy a Lucene FSDirectory containing 6.3 M. documents over an Infinispan Directory using the lucene Directory.copy method.

      Here after my Infinispan cache config:

       

      <namedCache name="luceneIndex">
              <loaders passivation="false" shared="true" preload="true">
                  <loader class="org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore"
                      fetchPersistentState="false" ignoreModifications="false"
                      purgeOnStartup="false">
                      <properties>
                          <property name="bucketTableNamePrefix" value="hs_code_finder" />
                          <property name="idColumnName" value="ID_COLUMN" />
                          <property name="dataColumnName" value="DATA_COLUMN" />
                          <property name="timestampColumnName" value="TIMESTAMP_COLUMN" />
                          <property name="timestampColumnType" value="BIGINT" />
                          <property name="connectionFactoryClass"
                              value="org.infinispan.loaders.jdbc.connectionfactory.PooledConnectionFactory" />
                          <property name="connectionUrl" value="jdbc:mysql:///infinispan" />
                          <property name="userName" value="infinispan" />
                          <property name="driverClass" value="com.mysql.jdbc.Driver" />
                          <property name="idColumnType" value="VARCHAR(256)" />
                          <property name="dataColumnType" value="BLOB" />
                          <property name="dropTableOnExit" value="false" />
                          <property name="createTableOnStart" value="true" />
                      </properties>
                      <async enabled="true" flushLockTimeout="15000" threadPoolSize="3" />                
                  </loader>
              </loaders>
      
              <eviction wakeUpInterval="5000" maxEntries="-1" strategy="UNORDERED" />
      
              <clustering mode="distribution">
                  <l1 enabled="true" lifespan="600000" />
                  <hash numOwners="2" />
                  <sync />
              </clustering>
              
              <invocationBatching enabled="true" />
              <transaction syncCommitPhase="true" syncRollbackPhase="true"
                  transactionManagerLookupClass="org.infinispan.transaction.lookup.JBossStandaloneJTAManagerLookup"
                  useEagerLocking="true" />
          </namedCache>
      

       

      During the copy process I recevied the following exception:

       

      2010-05-27 11:35:16,263 ERROR (org.infinispan.loaders.jdbc.DataManipulationHelper)[luceneIndex-JdbcBinaryCacheStore-0:] Failed clearing JdbcBinaryCacheStore
      java.sql.BatchUpdateException: No value specified for parameter 3
          at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1404)
          at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewProxyPreparedStatement.java:1723)
          at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.purgeInternal(JdbcBinaryCacheStore.java:325)
          at org.infinispan.loaders.AbstractCacheStore$2.run(AbstractCacheStore.java:86)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

      I'm using 4.1.0.ALPHA2. This looks like a bug (only 2 param are passed but the statement expects 3).

      Thanks,