RHDG REST request is not returning JSON style output

Solution Verified - Updated -

Issue

  • After migration to RHDG 7.3 the behaviour of REST queries changed. With legacy versions the result is JSON formatted, but with 7.3 it will be shown as binary. What is the reason for this?
  • After migrating to 7.3 the results of the rest api ickle search shows the individual "hit" row value as binary instead of json.
$ curl -X GET "http://localhost:8080/rest/IcklePlayCompanyCache?action=search&query=from%20playground.Company%20c%20where%20c.isStockCompany=true"
{
  "total_results" : 1,
  "hits" : [ {
    "hit" : "�\u0001\u0012playground.Company�\u0001U\b\u0001\u0012\u0007Red Hat\u0018\u0001\" \b\u0001\u0012\tWolf Fink\u001A\rwf@redhat.com (\u0001\"\u001D\b\u0002\u0012\u0007William\u001A\fm@redhat.com \u0011(\u0001(��ç�."
  } ]
}
  • Getting server side Exception and garbage result using REST to access caches
ERROR [org.infinispan.rest.Http20RequestHandler] (REST-ServerIO-3-2) ISPN012006: Uncaught exception in the pipeline: java.lang.NullPointerException
    at org.infinispan.rest.operations.CacheOperations.getCacheValues(CacheOperations.java:74)
    at org.infinispan.rest.InfinispanCacheAPIRequest.execute(InfinispanCacheAPIRequest.java:50)
    at org.infinispan.rest.Http20RequestHandler.channelRead0(Http20RequestHandler.java:57)
    at org.infinispan.rest.Http11RequestHandler.channelRead0(Http11RequestHandler.java:35)
    at org.infinispan.rest.Http11RequestHandler.channelRead0(Http11RequestHandler.java:18)
    at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374)
   ....

Environment

  • Red Hat Data Grid (RHDG)
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content