Uploaded image for project: 'CloverDX'
  1. CloverDX
  2. CLO-18753

JSONExtract Unable to Create Schema from Valid JSON

    XMLWordPrintable

    Details

    • Story Points:
      5
    • Branch:
    • QA Testing:
      UNDECIDED
    • QA Test Identification:
      org.jetel.data.parser.JsonSaxParserTest
    • OTRS_Ticket_ID:
      208544
    • Epic Link:
    • Sprint:
      Magenta Sprint 22, Magenta Sprint 23

      Description

      Try creating XSD schema from the below valid JSON. It will result in the below error in the .log.

       

      [
      [

      { "final_order_id": "123", "from_drop_client": "123", "order_by_drop_client": "123", "order_time": "2020-01-01 08:00:00", "content": "abc" }

      ]
      ]

       

      !ENTRY com.cloveretl.gui 4 0 2020-03-19 14:09:03.153
      !MESSAGE Failed to generate schema.
      !STACK 0
      java.lang.reflect.InvocationTargetException
      {{ at com.cloveretl.gui.editors.tree.reader.o.run(Main:64)}}
      {{ at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)}}
      Caused by: java.lang.Exception: Failed to generate XSD file
      {{ at com.cloveretl.gui.sc.A(Main:318)}}
      {{ at com.cloveretl.gui.jface.dialogs.lv.A(Main:110)}}
      {{ at com.cloveretl.gui.editors.tree.reader.o.run(Main:62)}}
      {{ ... 1 more}}
      Caused by: java.util.NoSuchElementException
      {{ at java.util.ArrayDeque.getLast(ArrayDeque.java:340)}}
      {{ at org.jetel.data.parser.JsonSaxParser.processToken(JsonSaxParser.java:269)}}
      {{ at org.jetel.data.parser.JsonSaxParser.convertJSON2XML(JsonSaxParser.java:143)}}
      {{ at com.cloveretl.gui.sc.A(Main:300)}}
      {{ ... 3 more}}
      Root exception:
      java.lang.Exception: Failed to generate XSD file
      {{ at com.cloveretl.gui.sc.A(Main:318)}}
      {{ at com.cloveretl.gui.jface.dialogs.lv.A(Main:110)}}
      {{ at com.cloveretl.gui.editors.tree.reader.o.run(Main:62)}}
      {{ at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)}}
      Caused by: java.util.NoSuchElementException
      {{ at java.util.ArrayDeque.getLast(ArrayDeque.java:340)}}
      {{ at org.jetel.data.parser.JsonSaxParser.processToken(JsonSaxParser.java:269)}}
      {{ at org.jetel.data.parser.JsonSaxParser.convertJSON2XML(JsonSaxParser.java:143)}}
      {{ at com.cloveretl.gui.sc.A(Main:300)}}
      {{ ... 3 more}}

        Attachments

          Activity

            People

            Assignee:
            reichmanf Filip Reichman
            Reporter:
            bartonv Vladimir Barton
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: