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

Cache creation wizard: Download of configuration is not correct in case of errors in config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 14.0.2.Final
    • Console
    • None

      In cache creation wizard, e.g. choose the cache to have persistence capability.

      Then in cache config review page, in cache editor click Download JSON - the json will be downloaded normally. Then change in cache config editor the config so that you have some config errors, e.g. change 'string-keyed-table' to be 'string-eyed-table', then change the Download option to Download XML or YAML file.

      You will see that the download will proceed i.e. cache_name.xml or cache_name.yaml will be downloaded, but it will contain the previously downloaded JSON code.

      The same if I will fix the config and download it as YAML, it will proceed normally and normal YAML content will be downloaded. But if I will spoil the config and try to download it as XML, the cache_name.xml file will be downloaded but it will contain the previously downloaded yaml content, i.e. inside the config will be in yaml format.

      But in both cases descibed above, the server gives an exception in the logs.

      2022-10-31 14:59:58,701 ERROR (blocking-thread-infinispan-4-e2e-p3-t2) [org.infinispan.rest.RestRequestHandler] ISPN012005: An error occurred while responding to the client java.util.concurrent.CompletionException: org.infinispan.commons.CacheConfigurationException: org.infinispan.commons.configuration.io.ConfigurationReaderException: Unexpected element 'string-eyed-table' encountered[1,0]
          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.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
          at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
          at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: org.infinispan.commons.CacheConfigurationException: org.infinispan.commons.configuration.io.ConfigurationReaderException: Unexpected element 'string-eyed-table' encountered[1,0]
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:163)
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:145)
          at org.infinispan.rest.resources.CacheResourceV2.lambda$convert$5(CacheResourceV2.java:338)
          at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
          ... 5 more
      Caused by: org.infinispan.commons.configuration.io.ConfigurationReaderException: Unexpected element 'string-eyed-table' encountered[1,0]
          at org.infinispan.configuration.parsing.ParseUtils.unexpectedElement(ParseUtils.java:36)
          at org.infinispan.configuration.parsing.CacheParser.parseStoreElement(CacheParser.java:1693)
          at org.infinispan.configuration.parsing.Parser.parseStoreElement(Parser.java:1368)
          at org.infinispan.persistence.jdbc.configuration.JdbcStoreConfigurationParser.parseStringKeyedJdbcStore(JdbcStoreConfigurationParser.java:81)
          at org.infinispan.persistence.jdbc.configuration.JdbcStoreConfigurationParser.readElement(JdbcStoreConfigurationParser.java:46)
          at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:209)
          at org.infinispan.configuration.parsing.ConfigurationBuilderHolder.handleAnyElement(ConfigurationBuilderHolder.java:139)
          at org.infinispan.commons.configuration.io.AbstractConfigurationReader.handleAny(AbstractConfigurationReader.java:57)
          at org.infinispan.configuration.parsing.CacheParser.parsePersistence(CacheParser.java:1403)
          at org.infinispan.configuration.parsing.CacheParser.parseCacheElement(CacheParser.java:490)
          at org.infinispan.configuration.parsing.CacheParser.parseSharedStateCacheElement(CacheParser.java:222)
          at org.infinispan.configuration.parsing.CacheParser.parseDistributedCache(CacheParser.java:1247)
          at org.infinispan.configuration.parsing.CacheParser.readElement(CacheParser.java:118)
          at org.infinispan.configuration.parsing.ParserRegistry.parseElement(ParserRegistry.java:209)
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:187)
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:175)
          at org.infinispan.configuration.parsing.ParserRegistry.parse(ParserRegistry.java:157)
          ... 8 more
       

      Please note, that it doesn't happen with JSON format, i.e. if I have successfully downloaded normal yaml config file, then spoil the config and download it as JSON, *.json file will be downloaded with spoiled JSON in it.

            karestig@redhat.com Katia Aresti
            amanukya@redhat.com Anna Manukyan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: