Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15041

HotRod query exception missing stack trace to the caller

    XMLWordPrintable

Details

    Description

      When analyzing an exception on the client side, the stack trace showed only the Client's event loop stack trace, but not the stack trace of the client code. The culprit is the Util.java which unwraps the exception.

      // org.infinispan.hotrod.impl.Util
         protected static RuntimeException rewrap(ExecutionException e) {
            if (e.getCause() instanceof HotRodClientException) {
               return (HotRodClientException) e.getCause();
            } else if (e.getCause() instanceof CacheException) {
               return (CacheException) e.getCause();
            } else {
               return new TransportException(e.getCause(), null);
            }
         }

       

      Existing stack trace with the trace to the caller:

      org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=561 returned server error (status=0x85): org.hibernate.search.util.common.SearchException: Exception while searching locally
      java.util.concurrent.ExecutionException: org.hibernate.search.util.common.SearchException: HSEARCH000587: Unable to provide the exact total hit count: only a lower-bound approximation is available. This is generally the result of setting query options such as a timeout or the total hit count threshold. Either unset these options, or retrieve the lower-bound hit count approximation through '.total().hitCountLowerBound()'.
      org.hibernate.search.util.common.SearchException: HSEARCH000587: Unable to provide the exact total hit count: only a lower-bound approximation is available. This is generally the result of setting query options such as a timeout or the total hit count threshold. Either unset these options, or retrieve the lower-bound hit count approximation through '.total().hitCountLowerBound()'.
      
          at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:337)
          at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:173)
          at org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:133)
          at org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:94)
          at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
          at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
          at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
          at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
          at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
          at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
          at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:800)
          at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:499)
          at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:397)
          at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
          at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
          at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
          at java.base/java.lang.Thread.run(Thread.java:833) 

      Attachments

        Issue Links

          Activity

            People

              wburns@redhat.com Will Burns
              aschwart@redhat.com Alexander Schwartz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: