1 Reply Latest reply on Jul 6, 2017 4:16 AM by Galder Zamarreño

    Comptability mode and HotRod Client and .proto

    Gregory Orciuch Newbie

      Hi,

       

      I do have a challenge to access same cache via HotRod client and via ServerTask (executed ofc on infinispan server side, but via direct CacheManager).

      So I read that I 've to set compatibility mode:

      <replicated-cache name="siteCacheDEV" mode="SYNC" statistics="true">
        <transaction stop-timeout="30000" mode="NONE" locking="OPTIMISTIC"/>
        <compatibility enabled="true"/>
        <security>
        <authorization enabled="true" roles="masterRole"/>
        </security>
      </replicated-cache>
      

       

      For the HotRod client I use ProfoField annotations on given entities; So it construct .proto files, then publish it to remote server. Everything is fine with cache access with just HotRod client.

      Once cache is set to "compatibility mode" I cannot talk with that via HotRod.

       

      Server logs showing that:

      13:57:32,031 DEBUG [org.infinispan.server.hotrod.HotRodExceptionHandler] (HotRod-ServerWorker-4-1) Exception caught: org.infinispan.commons.CacheException: java.io.IOException: Unsupported protocol version 74

        at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.java:70)

        at org.infinispan.server.hotrod.HotRodTypeConverter.boxKey(HotRodTypeConverter.java:37)

        at org.infinispan.compat.DoubleTypeConverter.boxKey(DoubleTypeConverter.java:23)

        at org.infinispan.cache.impl.TypeConverterDelegatingAdvancedCache.boxKey(TypeConverterDelegatingAdvancedCache.java:72)

        at org.infinispan.cache.impl.TypeConverterDelegatingAdvancedCache.put(TypeConverterDelegatingAdvancedCache.java:191)

        at org.infinispan.security.impl.SecureCacheImpl.put(SecureCacheImpl.java:640)

        at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:296)

        at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.java:231)

        at org.infinispan.server.hotrod.ContextHandler.realRead(ContextHandler.java:74)

        at org.infinispan.server.hotrod.ContextHandler.lambda$null$0(ContextHandler.java:59)

        at org.infinispan.security.Security.doAs(Security.java:143)

        at org.infinispan.server.hotrod.ContextHandler.lambda$channelRead0$1(ContextHandler.java:58)

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

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

        at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)

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

      Caused by: java.io.IOException: Unsupported protocol version 74

        at org.jboss.marshalling.river.RiverUnmarshaller.start(RiverUnmarshaller.java:1348)

        at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.startObjectInput(AbstractJBossMarshaller.java:128)

        at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:109)

        at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)

        at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.java:68)

        ... 15 more

       

      Thing is I'd now want to execute server task like that: jboss-jdg-quickstarts/BooksQueryingTask.java at jdg-7.1.x · jboss-developer/jboss-jdg-quickstarts · GitHub

      I do have my custom pojos at classpath via jboss modules. But this moment is not reached since Unsupported protocl version 74, when putting objects to compatibility cache via HotRod (and ProtoStream+proto annotated classes)

       

      Thanks in advance for any ideas.

      (9.0.0.Final)

       

      BR,

      Gregory