2 Replies Latest reply on Jun 7, 2012 12:00 PM by dex80526

    ISPN000073: Unexpected error while replicating (nullpoint exception) with evict

    dex80526

      I have the 2 node cluter configured in replication.

       

      I'll get the NullPointerException when update data on node1 with Evict is enalbed. but it works all fine without Evict.

      ERROR org.infinispan.remoting.rpc.RpcManagerImpl[169] - ISPN000073: Unexpected error while replicating

      java.lang.NullPointerException

              at org.infinispan.cacheviews.CacheViewsManagerImpl.getCommittedView(CacheViewsManagerImpl.java:188)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:149)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:183)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:240)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:227)

              at org.infinispan.remoting.rpc.RpcManagerImpl.invokeRemotely(RpcManagerImpl.java:222)

              at org.infinispan.remoting.rpc.RpcManagerImpl.broadcastRpcCommand(RpcManagerImpl.java:201)

              at org.infinispan.interceptors.ReplicationInterceptor.broadcastPrepare(ReplicationInterceptor.java:136)

              at org.infinispan.interceptors.ReplicationInterceptor.visitPrepareCommand(ReplicationInterceptor.java:128)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.DeadlockDetectingInterceptor.visitPrepareCommand(DeadlockDetectingInterceptor.java:108)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.CacheStoreInterceptor.visitPrepareCommand(CacheStoreInterceptor.java:184)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.base.CommandInterceptor.handleDefault(CommandInterceptor.java:130)

              at org.infinispan.commands.AbstractVisitor.visitPrepareCommand(AbstractVisitor.java:126)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.EntryWrappingInterceptor.visitPrepareCommand(EntryWrappingInterceptor.java:93)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.locking.AbstractTxLockingInterceptor.invokeNextAndCommitIf1Pc(AbstractTxLockingInterceptor.java:120)

              at org.infinispan.interceptors.locking.OptimisticLockingInterceptor.visitPrepareCommand(OptimisticLockingInterceptor.java:132)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.NotificationInterceptor.visitPrepareCommand(NotificationInterceptor.java:58)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.TxInterceptor.visitPrepareCommand(TxInterceptor.java:106)

              at org.infinispan.commands.tx.PrepareCommand.acceptVisitor(PrepareCommand.java:133)

              at org.infinispan.interceptors.base.CommandInterceptor.invokeNextInterceptor(CommandInterceptor.java:116)

              at org.infinispan.interceptors.StateTransferLockInterceptor.handleWithRetries(StateTransferLockInterceptor.java:213)

              at org.infinispan.interceptors.StateTransferLockInterceptor.visitPrepareCommand(StateTransferLockInterceptor.jav

       

      When the error occurs, on the other node I notice the following:

      ISPN000069: Cache named [testcache] exists but isn't in a state to handle remote invocations

       

      Here is my config:

        <namedCache name="testcache" >  <!--  the name must match CacheType.java -->

            <clustering mode="replication">

               <stateTransfer

                  timeout="240000"

                  fetchInMemoryState="true"

               />

               <sync replTimeout="20000"/>       

            </clustering>

            <transaction transactionMode="TRANSACTIONAL" />

           <eviction

               maxEntries="500"

               strategy="LIRS"

            />

       

            <expiration

               wakeUpInterval="500"

               lifespan="-1"

               maxIdle="-1"

            />

       

            <loaders

                  passivation="false"

                  shared="false"

                  preload="true">

                 <loader

                    class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore"

                    fetchPersistentState="true"

                    purgeOnStartup="false">

       

                    <properties>

                      <property name="stringsTableNamePrefix" value="ISPN_STRING_TABLE"/>

                      <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.ManagedConnectionFactory"/>

                      <property name="datasourceJndiLocation" value="java:comp/env/jdbc/TestDB"/>

       

                      <property name="idColumnType" value="VARCHAR(255)"/>

                      <property name="dataColumnType" value="BLOB"/>

                      <property name="dropTableOnExit" value="false"/>

                      <property name="createTableOnStart" value="true"/>

                   </properties>

                       <async enabled="true" flushLockTimeout="15000" shutdownTimeout="30000" modificationQueueSize="1000" threadPoolSize="100"/>

                 </loader>

      </loaders>

        • 1. Re: ISPN000073: Unexpected error while replicating (nullpoint exception) with evict
          dex80526

          I am on Infinispan 5.1.4.Final.

          • 2. Re: ISPN000073: Unexpected error while replicating (nullpoint exception) with evict
            dex80526

            I found out the root cause is the SQL select statement is worng for Derby:

            Running sql 'SELECT DATA_COLUMN, ID_COLUMN FROM ISPN_STRING_TABLE_keychain LIMIT ?

             

            ISPN008007: SQL error while fetching all StoredEntries

            java.sql.SQLSyntaxErrorException: Syntax error: Encountered "?" at line 1, column 69.

                    at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)

                    at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)

                    at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)

                    at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)

                    at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)

                    at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)

                    at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)

                    at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)

             

            I create an issue/bug (https://issues.jboss.org/browse/ISPN-2101).

             

            Any one has a workaround?