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

The console cannot display data converted to JSON

    XMLWordPrintable

Details

    • Undefined

    Description

      Given a cache configured to store POJOs:

      <encoding media-type="application/x-java-object"/>

      where the jars are present in the server lib/ dir, and the server is started to allow all deserialization:

      -Dinfinispan.deserialization.allowlist.regexps=".*"

      the console cannot display the entries as JSON. This is a sample output from the REST getEntries method:

      [
        {
          "key": 3,
          "value": {
            "_type": "org.infinispan.simple.Person",
            "name": "donald",
            "age": 78
          },
          "timeToLiveSeconds": -1,
          "maxIdleTimeSeconds": -1,
          "created": -1,
          "lastUsed": -1,
          "expireTime": -1
        },
        {
          "key": 1,
          "value": {
            "_type": "org.infinispan.simple.Person",
            "name": "kim",
            "age": 67
          },
          "timeToLiveSeconds": -1,
          "maxIdleTimeSeconds": -1,
          "created": -1,
          "lastUsed": -1,
          "expireTime": -1
        },
        {
          "key": 2,
          "value": {
            "_type": "org.infinispan.simple.Person",
            "name": "joe",
            "age": 48
          },
          "timeToLiveSeconds": -1,
          "maxIdleTimeSeconds": -1,
          "created": -1,
          "lastUsed": -1,
          "expireTime": -1
        }
      ]
      

      The console cannot display this JSON showing an error:

      Something went wrong
      Error: Expected `string` for value, got `[object Object]`

      Attachments

        Issue Links

          Activity

            People

              karestig@redhat.com Katia Aresti
              gfernand@redhat.com Gustavo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: