2 Replies Latest reply on Oct 10, 2011 4:18 AM by Dan Berindei

    Postgres JdbcStore: IOException: Unsupported protocol version 92

    Mariusz Smykula Newbie

      I have problem with configuring JdbcStringBasedCacheStore on JBoss 6.1 (Infinispan 4.2.1.Final) with Postgres SQL

       

      Error is:

      Execution error: : org.infinispan.loaders.CacheLoaderException: I/O error while unmarshalling from stream
                at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:92) [:4.2.1.FINAL]
                at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.readStoredEntry(JdbcStringBasedCacheStore.java:371) [:4.2.1.FINAL]
                at org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore.loadLockSafe(JdbcStringBasedCacheStore.java:295) [:4.2.1.FINAL]
                at org.infinispan.loaders.LockSupportCacheStore.load(LockSupportCacheStore.java:100) [:4.2.0.FINAL]
      
      ....
      
      Caused by: java.io.IOException: Unsupported protocol version 92
                at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1128) [:6.1.0.Final]
                at org.infinispan.marshall.jboss.GenericJBossMarshaller.startObjectInput(GenericJBossMarshaller.java:169) [:4.2.0.FINAL]
                at org.infinispan.marshall.VersionAwareMarshaller.startObjectInput(VersionAwareMarshaller.java:155) [:4.2.0.FINAL]
                at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:112) [:4.2.0.FINAL]
                at org.infinispan.marshall.AbstractStreamingMarshaller.objectFromInputStream(AbstractStreamingMarshaller.java:23) [:4.2.0.FINAL]
                at org.infinispan.loaders.jdbc.JdbcUtil.unmarshall(JdbcUtil.java:88) [:4.2.1.FINAL]
                ... 74 more
      

       

       

       

       

      My cache configuration look like this:

       

      <default>
         <locking isolationLevel="REPEATABLE_READ"  lockAcquisitionTimeout="20000" writeSkewCheck="false"  concurrencyLevel="500" useLockStriping="false" />
         <jmxStatistics enabled="true" />
         <loaders passivation="false">
                <loader  class="org.infinispan.loaders.jdbc.stringbased.JdbcStringBasedCacheStore" fetchPersistentState="false" ignoreModifications="false"  purgeOnStartup="false">
                        <properties>
                            <property name="stringsTableNamePrefix" value="SAMPLE_" />
                            <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:postgresql://localhost:5432/database />
                            <property name="userName" value="pgadmin" />
                            <property name="password" value="password" />
      
                            <property name="driverClass" value="org.postgresql.Driver" />
                            <property name="idColumnType" value="VARCHAR(255)" />
                            <property name="dataColumnType" value="bytea" />
                            <property name="dropTableOnExit" value="false" />
                            <property name="createTableOnStart" value="true" />
                       </properties>
                 </loader>
           </loaders>
      </default>