[infinispan-issues] [JBoss JIRA] (ISPN-10760) nodejs-client fails when tries to use custom event converters
Anna Manukyan (Jira)
issues at jboss.org
Mon Feb 17 04:14:00 EST 2020
[ https://issues.redhat.com/browse/ISPN-10760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Anna Manukyan resolved ISPN-10760.
----------------------------------
Resolution: Explained
The custom filter, by default, will try to convert whatever is stored in the cache to a POJO (it can be overriden in the impl), so it can have problems if you don't configure the cache type as it doesn't know what the data is
So the addition of following configuration to cache config on the server, resolves the issue:
{code}
<encoding>
<key media-type="text/plain"/>
<value media-type="text/plain"/>
</encoding>
{code}
> nodejs-client fails when tries to use custom event converters
> -------------------------------------------------------------
>
> Key: ISPN-10760
> URL: https://issues.redhat.com/browse/ISPN-10760
> Project: Infinispan
> Issue Type: Bug
> Components: Server
> Affects Versions: 10.0.0.CR3
> Reporter: Anna Manukyan
> Assignee: Ryan Emerson
> Priority: Major
>
> When the nodejs-client connects to ServerNG and tries to use a custome event converter the operation fails with exception:
> {code}
> 12:39:42,721 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (SINGLE_PORT-ServerIO-5-13) ISPN000136: Error executing command PutMapCommand on Cache 'default', writing keys [WrappedByteArray{bytes=\{\"\k\"\:\"\j\l\o\c\a\l\-\i\t\3\"\}, hashCode=1235679806}, WrappedByteArray{bytes=\{\"\k\"\:\"\j\l\o\c\a\l\-\i\t\1\"\}, hashCode=1235677884}, WrappedByteArray{bytes=\{\"\k\"\:\"\j\l\o\c\a\l\-\i\t\2\"\}, hashCode=1235678845}]: org.infinispan.commons.dataconversion.EncodingException: ISPN000934: Unsupported content '[B at 204b7b49'
> at org.infinispan.commons.dataconversion.BinaryTranscoder.transcode(BinaryTranscoder.java:67)
> at org.infinispan.encoding.DataConversion.convert(DataConversion.java:144)
> at org.infinispan.notifications.cachelistener.CacheNotifierImpl.convertKey(CacheNotifierImpl.java:312)
> at org.infinispan.notifications.cachelistener.CacheNotifierImpl.configureEvent(CacheNotifierImpl.java:515)
> at org.infinispan.notifications.cachelistener.CacheNotifierImpl.doNotifyCreated(CacheNotifierImpl.java:406)
> at org.infinispan.notifications.cachelistener.CacheNotifierImpl.notifyCacheEntryCreated(CacheNotifierImpl.java:390)
> at org.infinispan.interceptors.impl.CallInterceptor.visitPutMapCommand(CallInterceptor.java:481)
> at org.infinispan.commands.write.PutMapCommand.acceptVisitor(PutMapCommand.java:68)
> at org.infinispan.interceptors.impl.CallInterceptor.visitCommand(CallInterceptor.java:166)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextThenApply(BaseAsyncInterceptor.java:81)
> at org.infinispan.interceptors.impl.EntryWrappingInterceptor.setSkipRemoteGetsAndInvokeNextForManyEntriesCommand(EntryWrappingInterceptor.java:658)
> at org.infinispan.interceptors.impl.EntryWrappingInterceptor.visitPutMapCommand(EntryWrappingInterceptor.java:412)
> at org.infinispan.commands.write.PutMapCommand.acceptVisitor(PutMapCommand.java:68)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndFinally(BaseAsyncInterceptor.java:155)
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.lambda$nonTxLockAndInvokeNext$3(AbstractLockingInterceptor.java:308)
> at org.infinispan.interceptors.SyncInvocationStage.andHandle(SyncInvocationStage.java:70)
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.nonTxLockAndInvokeNext(AbstractLockingInterceptor.java:303)
> at org.infinispan.interceptors.locking.NonTransactionalLockingInterceptor.handleWriteManyCommand(NonTransactionalLockingInterceptor.java:65)
> at org.infinispan.interceptors.locking.AbstractLockingInterceptor.visitPutMapCommand(AbstractLockingInterceptor.java:182)
> at org.infinispan.commands.write.PutMapCommand.acceptVisitor(PutMapCommand.java:68)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:59)
> at org.infinispan.interceptors.impl.CacheMgmtInterceptor.visitPutMapCommand(CacheMgmtInterceptor.java:162)
> at org.infinispan.commands.write.PutMapCommand.acceptVisitor(PutMapCommand.java:68)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNext(BaseAsyncInterceptor.java:59)
> at org.infinispan.interceptors.DDAsyncInterceptor.handleDefault(DDAsyncInterceptor.java:53)
> at org.infinispan.interceptors.DDAsyncInterceptor.visitPutMapCommand(DDAsyncInterceptor.java:89)
> at org.infinispan.commands.write.PutMapCommand.acceptVisitor(PutMapCommand.java:68)
> at org.infinispan.interceptors.BaseAsyncInterceptor.invokeNextAndExceptionally(BaseAsyncInterceptor.java:128)
> at org.infinispan.interceptors.impl.InvocationContextInterceptor.visitCommand(InvocationContextInterceptor.java:89)
> at org.infinispan.interceptors.impl.AsyncInterceptorChainImpl.invokeAsync(AsyncInterceptorChainImpl.java:226)
> at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeededAsync(CacheImpl.java:1847)
> at org.infinispan.cache.impl.CacheImpl.putAllAsync(CacheImpl.java:1508)
> at org.infinispan.cache.impl.CacheImpl.putAllAsync(CacheImpl.java:1501)
> at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.putAllAsync(AbstractDelegatingAdvancedCache.java:460)
> at org.infinispan.cache.impl.EncoderCache.putAllAsync(EncoderCache.java:303)
> at org.infinispan.server.hotrod.CacheRequestProcessor.putAllInternal(CacheRequestProcessor.java:415)
> at org.infinispan.server.hotrod.CacheRequestProcessor.putAll(CacheRequestProcessor.java:410)
> at org.infinispan.server.hotrod.HotRodDecoder.switch3(HotRodDecoder.java:1836)
> at org.infinispan.server.hotrod.HotRodDecoder.switch1_0(HotRodDecoder.java:156)
> at org.infinispan.server.hotrod.HotRodDecoder.decode(HotRodDecoder.java:143)
> at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:505)
> at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:444)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:283)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
> at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
> at org.infinispan.server.core.transport.StatsChannelHandler.channelRead(StatsChannelHandler.java:26)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352)
> at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1421)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360)
> at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:930)
> at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:794)
> at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:424)
> at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:326)
> at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
> at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
> at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the infinispan-issues
mailing list