Exception with NearCache in HotRod client accessing Embedded Infinispan server - 8.0.2 & 8.2.2
manjunathd May 26, 2016 4:32 AMHi,
I have a Java program that embeds a HotRod Infinispan server and the remote Java applications access the caches using the HotRod API. This perfectly works fine however when the NearCache is enabled at the client, the following exception is observed at the server.
An example implementation is at https://gist.github.com/manjunathd/d01e53ecbfd00539cf5689bd3e6fb581
I tried with 8.0.2 and 8.2.2 version of Infinispan.
Can you please help me understand if I'm missing any configuration?
Thank you.
============================== Exception ================================
TRACE 05/22 13:04:34 org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller Stop marshaller
TRACE 05/22 13:04:34 org.infinispan.client.hotrod.near.NearCacheService Removed key=a from near cache (listenedId=[B0xc55733e8a05046d8..[16])
DEBUG 05/22 13:04:34 org.infinispan.server.hotrod.CacheDecodeContext Exception caught
io.netty.handler.codec.DecoderException: org.infinispan.server.hotrod.HotRodException: java.lang.NullPointerException
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:425)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:168)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$core$transport$StatsChannelHandler$$super$channelRead(HotRodDecoder.scala:31)
at org.infinispan.server.core.transport.StatsChannelHandler$class.channelRead(StatsChannelHandler.scala:32)
at org.infinispan.server.hotrod.HotRodDecoder.channelRead(HotRodDecoder.scala:31)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:308)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:294)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:846)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.infinispan.server.hotrod.HotRodException: java.lang.NullPointerException
at org.infinispan.server.hotrod.CacheDecodeContext.createServerException(CacheDecodeContext.scala:96)
at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.scala:55)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:370)
... 15 more
Caused by: java.lang.NullPointerException
at org.infinispan.server.hotrod.Decoder2x$.createGetResponse(Decoder2x.scala:219)
at org.infinispan.server.hotrod.CacheDecodeContext.createGetResponse(CacheDecodeContext.scala:244)
at org.infinispan.server.hotrod.CacheDecodeContext.get(CacheDecodeContext.scala:176)
at org.infinispan.server.hotrod.HotRodDecoder.org$infinispan$server$hotrod$HotRodDecoder$$decodeKey(HotRodDecoder.scala:101)
at org.infinispan.server.hotrod.HotRodDecoder$$anonfun$decode$1.apply$mcV$sp(HotRodDecoder.scala:48)
at org.infinispan.server.hotrod.HotRodDecoder.wrapSecurity(HotRodDecoder.scala:206)
at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.scala:45)
... 16 more
TRACE 05/22 13:04:34 org.infinispan.server.hotrod.HotRodEncoder Encode msg ErrorResponse{version=23, messageId=4, operation=ErrorResponse, status=ServerError, msg=java.lang.NullPointerException}