Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Error on XML trasformation loading

  1. #1

    Default Error on XML trasformation loading

    Dear all

    I save normally my trasformation but some time I not able to reopen them.
    Is it a solvable problem ?
    This is the error I receive trying open them.

    org.pentaho.di.core.exception.KettleXMLException:
    Error reading information from file
    An invalid XML character (Unicode: 0x1f) was found in the element content of the document.

    at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:620)
    at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:583)
    at org.pentaho.di.ui.spoon.Spoon.openFile(Spoon.java:3087)
    at org.pentaho.di.ui.spoon.Spoon.loadLastUsedFile(Spoon.java:5807)
    at org.pentaho.di.ui.spoon.Spoon.lastFileSelect(Spoon.java:1247)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.xul.EventHandler.handleMenuEvent(EventHandler.java:44)
    at org.pentaho.xul.swt.menu.MenuBar.handleMenuEvent(MenuBar.java:52)
    at org.pentaho.xul.swt.menu.Menu.handleMenuEvent(Menu.java:117)
    at org.pentaho.xul.swt.menu.MenuChoice.handleMenuEvent(MenuChoice.java:77)
    at org.pentaho.xul.swt.menu.MenuChoice.handleEvent(MenuChoice.java:73)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:873)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:5639)
    at org.pentaho.di.ui.spoon.Spoon.run(Spoon.java:5735)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:371)
    Caused by: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1f) was found in the element content of the document.
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at org.pentaho.di.core.xml.XMLHandler.loadXMLFile(XMLHandler.java:609)
    ... 21 more

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Let me guess, you were trying to parse a binary file using a text file or CSV Input step?

    XML CAN NOT contain certain binary characters like 0x1F.

  3. #3

    Default Trasformation sample

    Dear Matt,

    attached you can see the XML.
    There are two steps as input text file (csv).
    One was cleaned with your javascript routine and the other one is the "dirty" original.
    I haven't understood if the problem is on XML file or in the file .
    If the problem is on the file please let me know what text char I have to search for.
    Bye
    Giovanni
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    XML doesn't support these kinds of codes - never - ever.
    That is why we added support to encapsulate them in the dev version (and 3.1.1) using variable-like expressions, in your case $[1F]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.