Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-302

InvalidProtocolBufferException when using int32 in repeated field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.1.0.Beta1
    • None
    • .NET
    • None

      When declaring a field in Proto schema as repeated and using integer type for it (int32), the cache manager throws the following error when storing objects in the cache:
      Caused by: org.infinispan.commons.CacheException: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).

      Stack trace:

       SetUp : Infinispan.HotRod.Exceptions.HotRodClientException : org.hibernate.search.bridge.BridgeException: Exception while calling bridge#set
      4: 	class: org.infinispan.query.remote.impl.indexing.ProtobufValueWrapper
      4: 	path: 
      4: org.infinispan.commons.CacheException: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
      4: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
      4:    at Infinispan.HotRod.SWIGGen.RemoteByteArrayCache.put(ByteArray key, ByteArray val) in C:\workdir\dotnet-client\build_windows\swig\RemoteByteArrayCache.cs:line 87
      4:    at Infinispan.HotRod.Impl.RemoteCacheSWIGGenImpl`2.Put(K key, V val) in C:\workdir\dotnet-client\src\main\cs\Infinispan\HotRod\Impl\RemoteCacheSWIGImpl.cs:line 70
      4:    at Infinispan.HotRod.Tests.RemoteQueryTest.PutUsers(IRemoteCache`2 remoteCache) in C:\workdir\dotnet-client\src\test\cs\Infinispan\HotRod\RemoteQueryTest.cs:line 446
      

      Server side error:

      4: 10:59:41,569 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (HotRodServerHandler-6-2) ISPN000136: Error executing command PutKeyValueCommand, writing keys [[B0x2801]: org.hibernate.search.bridge.BridgeException: Exception while calling bridge#set
      4: 	class: org.infinispan.query.remote.impl.indexing.ProtobufValueWrapper
      4: 	path: 
      4: 	at org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper.buildBridgeException(ContextualExceptionBridgeHelper.java:84)
      4: 	at org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper$OneWayConversionContextImpl.set(ContextualExceptionBridgeHelper.java:113)
      4: 	at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFieldForClassBridges(DocumentBuilderIndexedEntity.java:821)
      4: 	at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.buildDocumentFields(DocumentBuilderIndexedEntity.java:435)
      4: 	at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.getDocument(DocumentBuilderIndexedEntity.java:372)
      4: 	at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.createUpdateWork(DocumentBuilderIndexedEntity.java:287)
      4: 	at org.hibernate.search.engine.spi.DocumentBuilderIndexedEntity.addWorkToQueue(DocumentBuilderIndexedEntity.java:229)
      4: 	at org.hibernate.search.engine.impl.WorkPlan$PerEntityWork.enqueueLuceneWork(WorkPlan.java:521)
      4: 	at org.hibernate.search.engine.impl.WorkPlan$PerClassWork.enqueueLuceneWork(WorkPlan.java:283)
      4: 	at org.hibernate.search.engine.impl.WorkPlan.getPlannedLuceneWork(WorkPlan.java:155)
      4: 	at org.hibernate.search.backend.impl.WorkQueue.prepareWorkPlan(WorkQueue.java:114)
      4: 	at org.hibernate.search.backend.impl.BatchedQueueingProcessor.prepareWorks(BatchedQueueingProcessor.java:55)
      4: 	at org.hibernate.search.backend.impl.PerTransactionWorker.performWork(PerTransactionWorker.java:86)
      4: 	at org.infinispan.query.backend.QueryInterceptor.performSearchWorks(QueryInterceptor.java:249)
      4: 	at org.infinispan.query.backend.QueryInterceptor.performSearchWork(QueryInterceptor.java:243)
      4: 	at org.infinispan.query.backend.QueryInterceptor.updateIndexes(QueryInterceptor.java:236)
      4: 	at org.infinispan.query.backend.QueryInterceptor.processPutKeyValueCommand(QueryInterceptor.java:459)
      4: 	at org.infinispan.query.backend.QueryInterceptor.visitPutKeyValueCommand(QueryInterceptor.java:157)
      4: 	at org.infinispan.query.backend.QueryInterceptor.visitPutKeyValueCommand(QueryInterceptor.java:66)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
      4: 	at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitNonTxDataWriteCommand(AbstractLockingInterceptor.java:101)
      4: 	at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.visitDataWriteCommand(NonTransactionalLockingInterceptor.java:41)
      4: 	at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:67)
      4: 	at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutKeyValueCommand(AbstractLockingInterceptor.java:43)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
      4: 	at org.infinispan.statetransfer.StateTransferInterceptor.handleNonTxWriteCommand(StateTransferInterceptor.java:359)
      4: 	at org.infinispan.statetransfer.StateTransferInterceptor.handleWriteCommand(StateTransferInterceptor.java:290)
      4: 	at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:105)
      4: 	at org.infinispan.statetransfer.StateTransferInterceptor.visitPutKeyValueCommand(StateTransferInterceptor.java:62)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
      4: 	at org.infinispan.interceptors.impl.CacheMgmtInterceptor.updateStoreStatistics(CacheMgmtInterceptor.java:182)
      4: 	at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:168)
      4: 	at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutKeyValueCommand(CacheMgmtInterceptor.java:40)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
      4: 	at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:84)
      4: 	at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:53)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
      4: 	at org.infinispan.interceptors.impl.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:107)
      4: 	at org.infinispan.interceptors.impl.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:76)
      4: 	at org.infinispan.interceptors.DDSequentialInterceptor.visitPutKeyValueCommand(DDSequentialInterceptor.java:64)
      4: 	at org.infinispan.interceptors.DDSequentialInterceptor.visitPutKeyValueCommand(DDSequentialInterceptor.java:47)
      4: 	at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.handleActionSync(BaseSequentialInvocationContext.java:287)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:272)
      4: 	at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.invokeSync(BaseSequentialInvocationContext.java:253)
      4: 	at org.infinispan.interceptors.impl.SequentialInterceptorChainImpl.invoke(SequentialInterceptorChainImpl.java:227)
      4: 	at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1686)
      4: 	at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1220)
      4: 	at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1210)
      4: 	at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:526)
      4: 	at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:236)
      4: 	at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.scala:193)
      4: 	at org.infinispan.server.hotrod.ContextHandler.realRead(ContextHandler.java:73)
      4: 	at org.infinispan.server.hotrod.ContextHandler.lambda$channelRead0$1(ContextHandler.java:56)
      4: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      4: 	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:145)
      4: 	at java.lang.Thread.run(Thread.java:745)
      4: Caused by: org.infinispan.commons.CacheException: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
      4: 	at org.infinispan.query.remote.impl.indexing.WrappedMessageTagHandler.onEnd(WrappedMessageTagHandler.java:102)
      4: 	at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:59)
      4: 	at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:45)
      4: 	at org.infinispan.query.remote.impl.indexing.ProtobufValueWrapperFieldBridge.decodeAndIndex(ProtobufValueWrapperFieldBridge.java:58)
      4: 	at org.infinispan.query.remote.impl.indexing.ProtobufValueWrapperFieldBridge.set(ProtobufValueWrapperFieldBridge.java:46)
      4: 	at org.hibernate.search.bridge.util.impl.ContextualExceptionBridgeHelper$OneWayConversionContextImpl.set(ContextualExceptionBridgeHelper.java:110)
      4: 	... 67 more
      4: Caused by: protostream.com.google.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
      4: 	at protostream.com.google.protobuf.InvalidProtocolBufferException.invalidTag(InvalidProtocolBufferException.java:89)
      4: 	at protostream.com.google.protobuf.CodedInputStream.readTag(CodedInputStream.java:158)
      4: 	at org.infinispan.protostream.impl.RawProtoStreamReaderImpl.readTag(RawProtoStreamReaderImpl.java:44)
      4: 	at org.infinispan.protostream.ProtobufParser.parseMessage(ProtobufParser.java:64)
      4: 	at org.infinispan.protostream.ProtobufParser.parseInternal(ProtobufParser.java:58)
      4: 	at org.infinispan.protostream.ProtobufParser.parse(ProtobufParser.java:45)
      4: 	at org.infinispan.query.remote.impl.indexing.WrappedMessageTagHandler.onEnd(WrappedMessageTagHandler.java:100)
      4: 	... 72 more
      

              vrigamon@redhat.com Vittorio Rigamonti
              mgencur Martin Gencur
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: