Uploaded image for project: 'Red Hat Data Grid'
  1. Red Hat Data Grid
  2. JDG-7184

[Console] Incorrect nonsubmitted cache configuration is generating error logs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • RHDG 8.5.1 GA
    • RHDG 8.5.x CD
    • Console
    • None

      Writing (not submitting) a non-existing attribute to a cache custom configuration in the console results in the error server logs.

      It's a pretty simple to make a mistake while writting a configuration manually and while it's a handy feature it shouldn't result in server error logs till the cache is submitted

      Reproducer:

      • Open a console
      • Build a cache configuration
      • Try to add '"i-dont-exist": "I really don't"', you should see error log messages on the server

      Server log: (there's bunch of this stacktraces)

      2024-07-01 12:41:48,047 ERROR [o.i.r.RestRequestHandler] ISPN012005: An error occurred while responding to the client java.util.concurrent.CompletionException: org.infinispan.commons.configuration.io.ConfigurationReaderException: Unexpected attribute 'i-dont-exist' encountered[2,5]
      	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
      	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
      	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
      	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
      	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1521)
      	at java.base/java.lang.Thread.run(Thread.java:840)
      Caused by: org.infinispan.commons.configuration.io.ConfigurationReaderException: Unexpected attribute 'i-dont-exist' encountered[2,5]
      	at org.infinispan.configuration.parsing.ParseUtils.unexpectedAttribute(ParseUtils.java:71)
      	at org.infinispan.configuration.parsing.CacheParser.parseCacheAttribute(CacheParser.java:189)
      	at org.infinispan.configuration.parsing.CacheParser.parseClusteredCacheAttribute(CacheParser.java:757)
      	at org.infinispan.configuration.parsing.CacheParser.parseSegmentedCacheAttribute(CacheParser.java:734)
      	at org.infinispan.configuration.parsing.CacheParser.parseDistributedCache(CacheParser.java:827)
      	at org.infinispan.configuration.parsing.CacheParser.readElement(CacheParser.java:120)
      	at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:212)
      	at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:195)
      	at org.infinispan.rest.resources.CacheResourceV2.lambda$convert$9(CacheResourceV2.java:537)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
      	... 5 more
      

            karestig@redhat.com Katia Aresti
            rhn-support-pdrobek Pavel Drobek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: