[
https://issues.jboss.org/browse/ISPN-9426?page=com.atlassian.jira.plugin....
]
Galder Zamarreño commented on ISPN-9426:
----------------------------------------
At the protocol level, a null return is sent as an empty byte[]. The java client
transforms that into null. I guess that's cos there's no transformation to String?
If the user wanted it as text plain String it should be converted to empty String.
Debugging the code the request mediat type is String, so {testLocalTypedExecNullReturn}
should be expecting empty String instead of null? Then executing the same script
distributed should return a collection of empty Strings. [~gustavonalle] ?
Distributed script execution returning null results in
NullPointerException
---------------------------------------------------------------------------
Key: ISPN-9426
URL:
https://issues.jboss.org/browse/ISPN-9426
Project: Infinispan
Issue Type: Bug
Affects Versions: 9.4.0.Beta1
Reporter: Galder Zamarreño
Assignee: Galder Zamarreño
Fix For: 9.4.0.CR1
The following script:
{code}
// mode=distributed,language=javascript,datatype='text/plain; charset=utf-8'
cache.get("not-exist");
{code}
Results in:
{code}
org.infinispan.client.hotrod.exceptions.HotRodClientException:
Request for messageId=19 returned server error (status=0x85):
java.lang.NullPointerException
at
org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:338)
at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:180)
at
org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:138)
at
org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:98)
at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at
io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at
io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at
io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at
io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
at
io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at
io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
{code}
The issue happens with both latest 2.8 and older 2.5 protocol versions.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)