Hi i have probloem with this delimited charecter,it is actuually an unknown char(not of usual , : | etc.
when i use this i am getting this error;some body please help.
graph:
<?xml version="1.0" encoding="UTF-8"?>
<Graph created="Wed Mar 21 18:17:19 GMT+05:30 2007" guiVersion="1.6" licenseType="Unlicensed clover.GUI" modified="Tue Apr 03 14:26:26 GMT+05:30 2007" name="per_test" revision="1.329">
<Global>
<Metadata id="Metadata3">
<Record name="aggr" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="Count" nullable="true" shift="0" type="integer"/>
<Field delimiter="\n" name="sum" nullable="true" shift="0" type="integer"/>
</Record>
</Metadata>
<Metadata id="Metadata0">
<Record name="inrec" recordDelimiter="" recordSize="-1" type="delimited">
<Field delimiter="" name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="" name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="" name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
</Record>
</Metadata>
<Metadata id="Metadata1">
<Record name="outrec" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="LINE_ID" nullable="true" shift="0" type="integer"/>
</Record>
</Metadata>
<Metadata id="Metadata2">
<Record name="outrec_final" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
</Record>
</Metadata>
<Connection dbDriver="com.mysql.jdbc.Driver" dbURL="jdbc:mysql://localhost:3306/kettle" driverLibrary="file:/E:/MAST/pentaho-report-design-wizard-1.2.0.373.GA/pentaho-report-design-wizard-1.2.0.373.GA/lib/jdbc/mysql-connector-java-5.0.3-bin.jar" id="DBConnection0" name="NewConnection" password="kettle" type="JDBC" user="kettle"/>
<Sequence cached="1" fileURL="C:\default1.seq" id="Sequence0" name="seq" start="1" step="1" type="SIMPLE_SEQUENCE"/>
</Global>
<Phase number="0">
<Node aggregateFunctions="count()" aggregateKey="COMPANY_REGION_ID" enabled="enabled" guiHeight="0" guiName="Aggregate" guiWidth="0" guiX="545" guiY="107" id="AGGREGATE0" type="AGGREGATE"/>
<Node enabled="enabled" fileURL="E:/New Text Document.txt" guiHeight="0" guiName="Universal Data Writer" guiWidth="0" guiX="720" guiY="107" id="DATA_WRITER0" type="DATA_WRITER"/>
<Node dbConnection="DBConnection0" dbTable="xyz1" enabled="enabled" fieldMap="COMPANY_ID=COMPANY_ID;COMPANY_REGION_ID=COMPANY_REGION_ID;PERSON_ID=PERSON_ID;PERSON_REGION_ID=PERSON_REGION_ID;COMPANY_INDUSTRY_ID=COMPANY_INDUSTRY_ID;CREATED_DATE=CREATED_DATE;MODIFIED_DATE=MODIFIED_DATE;LINE_ID=LINE_ID" guiHeight="0" guiName="DB Output Table" guiWidth="0" guiX="720" guiY="20" id="DB_OUTPUT_TABLE0" type="DB_OUTPUT_TABLE"/>
<Node charset="ISO-8859-1" enabled="enabled" fileURL="E:/test_files/company_con_industry.load" guiHeight="0" guiName="Delimited Data Reader" guiWidth="0" guiX="16" guiY="20" id="DELIMITED_DATA_READER0" type="DELIMITED_DATA_READER"/>
<Node enabled="enabled" guiHeight="0" guiName="Ext Sort" guiWidth="0" guiX="370" guiY="20" id="EXT_SORT0" sortKey="PERSON_ID" sortOrder="Ascending" sorterInitialCapacity="20000" type="EXT_SORT"/>
<Node enabled="enabled" guiHeight="0" guiName="Filter" guiWidth="0" guiX="370" guiY="107" id="FILTER0" type="FILTER">
<attr name="filterExpression">COMPANY_REGION_ID<1</attr>
</Node>
<Node enabled="enabled" guiHeight="0" guiName="Reformat" guiWidth="0" guiX="545" guiY="20" id="REFORMAT0" type="REFORMAT">
<attr name="transform">${out.0.COMPANY_ID} = ${in.0.COMPANY_ID};
${out.0.COMPANY_REGION_ID} = ${in.0.COMPANY_REGION_ID};
${out.0.PERSON_ID} = ${in.0.PERSON_ID};
${out.0.PERSON_REGION_ID} = ${in.0.PERSON_REGION_ID};
${out.0.COMPANY_INDUSTRY_ID} = ${in.0.COMPANY_INDUSTRY_ID};
${out.0.CREATED_DATE} = ${in.0.CREATED_DATE};
${out.0.MODIFIED_DATE} = new java.util.Date().toString();
${out.0.LINE_ID} = ${seq.Sequence0};
</attr>
</Node>
<Node enabled="enabled" guiHeight="0" guiName="Simple Copy" guiWidth="0" guiX="195" guiY="20" id="SIMPLE_COPY0" type="SIMPLE_COPY"/>
<Node enabled="enabled" guiHeight="0" guiName="Trash" guiWidth="0" guiX="545" guiY="194" id="TRASH0" type="TRASH"/>
<Edge debugMode="true" fromNode="AGGREGATE0:0" guiBendpoints="" id="Edge3" inPort="0 (Universal Data Writer)" metadata="Metadata3" outPort="0 (Aggregate)" toNode="DATA_WRITER0:0"/>
<Edge fromNode="DELIMITED_DATA_READER0:0" guiBendpoints="" id="Edge5" inPort="0 (Simple Copy)" metadata="Metadata0" outPort="0 (Delimited Data Reader)" toNode="SIMPLE_COPY0:0"/>
<Edge debugMode="true" fromNode="EXT_SORT0:0" guiBendpoints="" id="Edge8" inPort="0 (Reformat)" metadata="Metadata0" outPort="0 (Ext Sort)" toNode="REFORMAT0:0"/>
<Edge debugMode="true" fromNode="FILTER0:0" guiBendpoints="" id="Edge1" inPort="0 (Aggregate)" metadata="Metadata0" outPort="0 (Filter)" toNode="AGGREGATE0:0"/>
<Edge debugMode="true" fromNode="FILTER0:1" guiBendpoints="" id="Edge4" inPort="0 (Trash)" metadata="Metadata0" outPort="1 (Filter)" toNode="TRASH0:0"/>
<Edge debugMode="true" fromNode="REFORMAT0:0" guiBendpoints="" id="Edge7" inPort="0 (DB Output Table)" metadata="Metadata1" outPort="0 (Reformat)" toNode="DB_OUTPUT_TABLE0:0"/>
<Edge debugMode="true" fromNode="SIMPLE_COPY0:0" guiBendpoints="" id="Edge2" inPort="0 (Filter)" metadata="Metadata0" outPort="0 (Simple Copy)" toNode="FILTER0:0"/>
<Edge debugMode="true" fromNode="SIMPLE_COPY0:1" guiBendpoints="" id="Edge6" inPort="0 (Ext Sort)" metadata="Metadata0" outPort="1 (Simple Copy)" toNode="EXT_SORT0:0"/>
</Phase>
</Graph>
error:
Graph definition file: graphs\per_test1.grf
[Fatal Error] :12:44: Character reference "" is an invalid XML character.
ERROR [main] - Error when parsing graph's XML definition --> on line 12 row 44
org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:224)
at org.jetel.main.runGraph.loadGraph(runGraph.java:147)
at org.jetel.main.runGraph.main(runGraph.java:279)
ERROR [main] - Error in reading graph from XML !
org.jetel.exception.XMLConfigurationException: org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:229)
at org.jetel.main.runGraph.loadGraph(runGraph.java:147)
at org.jetel.main.runGraph.main(runGraph.java:279)
Caused by: org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:224)
... 2 more
thanks 2 anyone who resorts 2 help
when i use this i am getting this error;some body please help.
graph:
<?xml version="1.0" encoding="UTF-8"?>
<Graph created="Wed Mar 21 18:17:19 GMT+05:30 2007" guiVersion="1.6" licenseType="Unlicensed clover.GUI" modified="Tue Apr 03 14:26:26 GMT+05:30 2007" name="per_test" revision="1.329">
<Global>
<Metadata id="Metadata3">
<Record name="aggr" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="Count" nullable="true" shift="0" type="integer"/>
<Field delimiter="\n" name="sum" nullable="true" shift="0" type="integer"/>
</Record>
</Metadata>
<Metadata id="Metadata0">
<Record name="inrec" recordDelimiter="" recordSize="-1" type="delimited">
<Field delimiter="" name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="" name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="" name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="" name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
</Record>
</Metadata>
<Metadata id="Metadata1">
<Record name="outrec" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="LINE_ID" nullable="true" shift="0" type="integer"/>
</Record>
</Metadata>
<Metadata id="Metadata2">
<Record name="outrec_final" recordSize="-1" type="delimited">
<Field delimiter="," name="COMPANY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_REGION_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_ID" nullable="true" shift="0" type="integer"/>
<Field delimiter="," name="PERSON_REGION_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="COMPANY_INDUSTRY_ID" nullable="true" shift="0" type="string"/>
<Field delimiter="," name="CREATED_DATE" nullable="true" shift="0" type="string"/>
<Field delimiter="\n" name="MODIFIED_DATE" nullable="true" shift="0" type="string"/>
</Record>
</Metadata>
<Connection dbDriver="com.mysql.jdbc.Driver" dbURL="jdbc:mysql://localhost:3306/kettle" driverLibrary="file:/E:/MAST/pentaho-report-design-wizard-1.2.0.373.GA/pentaho-report-design-wizard-1.2.0.373.GA/lib/jdbc/mysql-connector-java-5.0.3-bin.jar" id="DBConnection0" name="NewConnection" password="kettle" type="JDBC" user="kettle"/>
<Sequence cached="1" fileURL="C:\default1.seq" id="Sequence0" name="seq" start="1" step="1" type="SIMPLE_SEQUENCE"/>
</Global>
<Phase number="0">
<Node aggregateFunctions="count()" aggregateKey="COMPANY_REGION_ID" enabled="enabled" guiHeight="0" guiName="Aggregate" guiWidth="0" guiX="545" guiY="107" id="AGGREGATE0" type="AGGREGATE"/>
<Node enabled="enabled" fileURL="E:/New Text Document.txt" guiHeight="0" guiName="Universal Data Writer" guiWidth="0" guiX="720" guiY="107" id="DATA_WRITER0" type="DATA_WRITER"/>
<Node dbConnection="DBConnection0" dbTable="xyz1" enabled="enabled" fieldMap="COMPANY_ID=COMPANY_ID;COMPANY_REGION_ID=COMPANY_REGION_ID;PERSON_ID=PERSON_ID;PERSON_REGION_ID=PERSON_REGION_ID;COMPANY_INDUSTRY_ID=COMPANY_INDUSTRY_ID;CREATED_DATE=CREATED_DATE;MODIFIED_DATE=MODIFIED_DATE;LINE_ID=LINE_ID" guiHeight="0" guiName="DB Output Table" guiWidth="0" guiX="720" guiY="20" id="DB_OUTPUT_TABLE0" type="DB_OUTPUT_TABLE"/>
<Node charset="ISO-8859-1" enabled="enabled" fileURL="E:/test_files/company_con_industry.load" guiHeight="0" guiName="Delimited Data Reader" guiWidth="0" guiX="16" guiY="20" id="DELIMITED_DATA_READER0" type="DELIMITED_DATA_READER"/>
<Node enabled="enabled" guiHeight="0" guiName="Ext Sort" guiWidth="0" guiX="370" guiY="20" id="EXT_SORT0" sortKey="PERSON_ID" sortOrder="Ascending" sorterInitialCapacity="20000" type="EXT_SORT"/>
<Node enabled="enabled" guiHeight="0" guiName="Filter" guiWidth="0" guiX="370" guiY="107" id="FILTER0" type="FILTER">
<attr name="filterExpression">COMPANY_REGION_ID<1</attr>
</Node>
<Node enabled="enabled" guiHeight="0" guiName="Reformat" guiWidth="0" guiX="545" guiY="20" id="REFORMAT0" type="REFORMAT">
<attr name="transform">${out.0.COMPANY_ID} = ${in.0.COMPANY_ID};
${out.0.COMPANY_REGION_ID} = ${in.0.COMPANY_REGION_ID};
${out.0.PERSON_ID} = ${in.0.PERSON_ID};
${out.0.PERSON_REGION_ID} = ${in.0.PERSON_REGION_ID};
${out.0.COMPANY_INDUSTRY_ID} = ${in.0.COMPANY_INDUSTRY_ID};
${out.0.CREATED_DATE} = ${in.0.CREATED_DATE};
${out.0.MODIFIED_DATE} = new java.util.Date().toString();
${out.0.LINE_ID} = ${seq.Sequence0};
</attr>
</Node>
<Node enabled="enabled" guiHeight="0" guiName="Simple Copy" guiWidth="0" guiX="195" guiY="20" id="SIMPLE_COPY0" type="SIMPLE_COPY"/>
<Node enabled="enabled" guiHeight="0" guiName="Trash" guiWidth="0" guiX="545" guiY="194" id="TRASH0" type="TRASH"/>
<Edge debugMode="true" fromNode="AGGREGATE0:0" guiBendpoints="" id="Edge3" inPort="0 (Universal Data Writer)" metadata="Metadata3" outPort="0 (Aggregate)" toNode="DATA_WRITER0:0"/>
<Edge fromNode="DELIMITED_DATA_READER0:0" guiBendpoints="" id="Edge5" inPort="0 (Simple Copy)" metadata="Metadata0" outPort="0 (Delimited Data Reader)" toNode="SIMPLE_COPY0:0"/>
<Edge debugMode="true" fromNode="EXT_SORT0:0" guiBendpoints="" id="Edge8" inPort="0 (Reformat)" metadata="Metadata0" outPort="0 (Ext Sort)" toNode="REFORMAT0:0"/>
<Edge debugMode="true" fromNode="FILTER0:0" guiBendpoints="" id="Edge1" inPort="0 (Aggregate)" metadata="Metadata0" outPort="0 (Filter)" toNode="AGGREGATE0:0"/>
<Edge debugMode="true" fromNode="FILTER0:1" guiBendpoints="" id="Edge4" inPort="0 (Trash)" metadata="Metadata0" outPort="1 (Filter)" toNode="TRASH0:0"/>
<Edge debugMode="true" fromNode="REFORMAT0:0" guiBendpoints="" id="Edge7" inPort="0 (DB Output Table)" metadata="Metadata1" outPort="0 (Reformat)" toNode="DB_OUTPUT_TABLE0:0"/>
<Edge debugMode="true" fromNode="SIMPLE_COPY0:0" guiBendpoints="" id="Edge2" inPort="0 (Filter)" metadata="Metadata0" outPort="0 (Simple Copy)" toNode="FILTER0:0"/>
<Edge debugMode="true" fromNode="SIMPLE_COPY0:1" guiBendpoints="" id="Edge6" inPort="0 (Ext Sort)" metadata="Metadata0" outPort="1 (Simple Copy)" toNode="EXT_SORT0:0"/>
</Phase>
</Graph>
error:
Graph definition file: graphs\per_test1.grf
[Fatal Error] :12:44: Character reference "" is an invalid XML character.
ERROR [main] - Error when parsing graph's XML definition --> on line 12 row 44
org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:224)
at org.jetel.main.runGraph.loadGraph(runGraph.java:147)
at org.jetel.main.runGraph.main(runGraph.java:279)
ERROR [main] - Error in reading graph from XML !
org.jetel.exception.XMLConfigurationException: org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:229)
at org.jetel.main.runGraph.loadGraph(runGraph.java:147)
at org.jetel.main.runGraph.main(runGraph.java:279)
Caused by: org.xml.sax.SAXParseException: Character reference "" is an invalid XML character.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:98)
at org.jetel.graph.TransformationGraphXMLReaderWriter.read(TransformationGraphXMLReaderWriter.java:224)
... 2 more
thanks 2 anyone who resorts 2 help
-
Hello!
Unfortunately it seems that character 29 is really not valid for xml or used xml parser. You can try for example preprocess your input file - substitute all these characters for some normal delimiter (, or ;) outside clover engine, consider using unix sed command or something like this.
If you are java developer you can extend StringUtils.stringToSpecChar() method for your special char translation - for more information about this solution contact me directly on martin.zatopek@javlinconsulting.cz
Martin
Please sign in to leave a comment.
Comments 1