[infinispan-issues] [JBoss JIRA] (HRJS-12) java.io.EOFException is thrown in case when executing javascript which puts into cache unicode symbols

Galder Zamarreño (JIRA) issues at jboss.org
Fri May 20 03:51:00 EDT 2016


    [ https://issues.jboss.org/browse/HRJS-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240372#comment-13240372 ] 

Galder Zamarreño commented on HRJS-12:
--------------------------------------

Hmmm, the exception in the description is not EOFException, but I do see such exception which in my case comes from storing the script itself:

{code}
09:47:14,285 ERROR [org.infinispan.interceptors.impl.InvocationContextInterceptor] (HotRodServerHandler-52-1) ISPN000136: Error executing command PutKeyValueCommand, writing keys [typed-put-get-unicode.js]: java.io.EOFException
        at org.jboss.marshalling.UTFUtils.readUTFBytes(UTFUtils.java:153)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:285)
        at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
        at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
        at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:134)
        at org.infinispan.commons.marshall.jboss.AbstractJBossMarshaller.objectFromByteBuffer(AbstractJBossMarshaller.java:112)
        at org.infinispan.commons.marshall.AbstractMarshaller.objectFromByteBuffer(AbstractMarshaller.java:82)
        at org.infinispan.server.hotrod.HotRodTypeConverter.unmarshall(HotRodTypeConverter.scala:38)
        at org.infinispan.server.hotrod.HotRodTypeConverter.boxValue(HotRodTypeConverter.scala:22)
        at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:82)
        at org.infinispan.interceptors.compat.BaseTypeConverterInterceptor.visitPutKeyValueCommand(BaseTypeConverterInterceptor.java:53)
        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
        at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
        at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.forkInvocationSync(BaseSequentialInvocationContext.java:90)
        at org.infinispan.interceptors.impl.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:105)
        at org.infinispan.interceptors.impl.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:74)
        at org.infinispan.interceptors.DDSequentialInterceptor.visitPutKeyValueCommand(DDSequentialInterceptor.java:64)
        at org.infinispan.interceptors.DDSequentialInterceptor.visitPutKeyValueCommand(DDSequentialInterceptor.java:47)
        at org.infinispan.commands.write.PutKeyValueCommand.acceptVisitor(PutKeyValueCommand.java:77)
        at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.doInvokeNextSync(BaseSequentialInvocationContext.java:265)
        at org.infinispan.interceptors.impl.BaseSequentialInvocationContext.invokeSync(BaseSequentialInvocationContext.java:253)
        at org.infinispan.interceptors.impl.SequentialInterceptorChainImpl.invoke(SequentialInterceptorChainImpl.java:227)
        at org.infinispan.cache.impl.CacheImpl.executeCommandAndCommitIfNeeded(CacheImpl.java:1686)
        at org.infinispan.cache.impl.CacheImpl.putInternal(CacheImpl.java:1220)
        at org.infinispan.cache.impl.CacheImpl.put(CacheImpl.java:1210)
        at org.infinispan.cache.impl.DecoratedCache.put(DecoratedCache.java:526)
        at org.infinispan.cache.impl.AbstractDelegatingAdvancedCache.put(AbstractDelegatingAdvancedCache.java:236)
        at org.infinispan.server.hotrod.CacheDecodeContext.put(CacheDecodeContext.scala:196)
        at org.infinispan.server.hotrod.ContextHandler.channelRead0(ContextHandler.java:47)
        at org.infinispan.server.hotrod.ContextHandler.channelRead0(ContextHandler.java:31)
        at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
        at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:292)
        at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:32)
        at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:283)
        at io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:36)
        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)
{code}

> 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
>            Assignee: Galder Zamarreño
>
> 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)
> }}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the infinispan-issues mailing list