]
Galder Zamarreño updated HRJS-12:
---------------------------------
Status: Open (was: New)
java.io.EOFException is thrown in case when executing javascript
which puts into cache unicode symbols
------------------------------------------------------------------------------------------------------
Key: HRJS-12
URL:
https://issues.jboss.org/browse/HRJS-12
Project: Infinispan Javascript client
Issue Type: Bug
Reporter: Anna Manukyan
An exception is thrown when executing the script on the server using JS Client and the
script tries to put into the cache unicode symbols. The issue appears for both local and
distributed modes.
The code is:
{code}
// mode=local,language=javascript,datatype='text/plain; charset=utf-8'
cache.put("բարեվ", "բարեվ");
cache.get("բարեվ");
{code}
The exception is:
{{15:53:30,947 ERROR [org.infinispan.server.hotrod.HotRodEncoder]
(HotRodServerWorker-6-3) ISPN005022: Exception writing response with messageId=92:
java.lang.ClassCastException: java.lang.String cannot be cast to [B
at
org.infinispan.server.hotrod.Encoder2x$$anonfun$writeResponse$9.apply(Encoder2x.scala:364)
at
org.infinispan.server.hotrod.Encoder2x$$anonfun$writeResponse$9.apply(Encoder2x.scala:343)
at scala.collection.immutable.List.foreach(List.scala:381)
at org.infinispan.server.hotrod.Encoder2x$.writeResponse(Encoder2x.scala:343)
at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.scala:45)
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)
at
io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:619)
at
io.netty.channel.AbstractChannelHandlerContext.access$1800(AbstractChannelHandlerContext.java:32)
at
io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:904)
at
io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:956)
at
io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:889)
at
io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:358)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:374)
at
io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at
io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137)
at java.lang.Thread.run(Thread.java:745)
}}