Closed nngakosso closed 4 years ago
@nngakosso it is failing to parse the markdown. Please attach a file that demonstrates the problem for troubleshooting.
The murex.md file you already have and this one I just made among several others from orchestra2md. output.zip
I see the problem with the phrase
would be mapped int as |21=723|.
The issue is that the pipe character is column delimiter in markdown tables. This causes the parser to see more columns in the line than there are column headers in that table.
Please try escaping those pipe characters with backslash as \|
. See https://github.github.com/gfm/#backslash-escapes
I did it but now I got this error :
line 22723:0 no viable alternative at input '\n'
16:09:05.576 [main] ERROR io.fixprotocol.md.event.DocumentParser.SyntaxErrorListener - Markdown parser failed at line 22723 position 0 due to no viable alternative at input '\n'
16:09:05.861 [main] FATAL io.fixprotocol.md2orchestra.Md2Orchestra - Md2Orchestra: exception occurred
java.io.IOException: Markdown parser failed; 1
at io.fixprotocol.md.event.DocumentParser.parse(DocumentParser.java:52) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?]
at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:246) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?]
at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:222) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?]
at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:143) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?]
at io.fixprotocol.md2orchestra.Md2Orchestra.main(Md2Orchestra.java:104) [md2orchestra-0.1.0-jar-with-dependencies.jar:?]
Is that number the last line of the document? If so, please try deleting the last blank line of the markdown file and rerun.
If it's successful then, we'll turn this into a bug report for failure to parse a blank line at end of the document. I've encountered that issue before but I haven't resolved it.
No more error now but the file is quite short as you can see. output3.zip
I ran it after escaping the pipe characters and deleting blank lines at the end with this command line:
java -jar target\md2orchestra-0.1.0-jar-with-dependencies.jar -i output.md -r FixRepository50SP2EP247.xml -o output.xml
It produced a large file - input and output attached issue15.zip
Glad that it is working on your side, on mine I got another error I can't figure out why. I ran the same command line as usual even tried with both FixRepository50SP2EP247 and OrchestraEP256 but I got this with your file with pipe characters escaped:
11:14:40.981 [main] FATAL io.fixprotocol.md2orchestra.Md2Orchestra - Md2Orchestra: exception occurred java.lang.NumberFormatException: Zero length BigInteger at java.math.BigInteger.
(BigInteger.java:485) ~[?:?] at java.math.BigInteger. (BigInteger.java:673) ~[?:?] at com.sun.xml.bind.DatatypeConverterImpl._parseInteger(DatatypeConverterImpl.java:61) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$22.parse(RuntimeBuiltinLeafInfoImpl.java:766) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$22.parse(RuntimeBuiltinLeafInfoImpl.java:764) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:209) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:182) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:547) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:526) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:138) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:518) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2725) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:541) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224) ~[?:?] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635) ~[?:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:228) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:199) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:170) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:209) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.RepositoryBuilder.unmarshal(RepositoryBuilder.java:946) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.RepositoryBuilder. (RepositoryBuilder.java:87) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:241) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:222) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:143) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.main(Md2Orchestra.java:104) [md2orchestra-0.1.0-jar-with-dependencies.jar:?] C:\Users\nngakosso\Documents\tablature\md2orchestra\target>java -jar md2orchestra-0.1.0-jar-with-dependencies.jar -i output.md -r FixRepository50SP2EP247.xml -o output.xml WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. 11:26:09.808 [main] FATAL io.fixprotocol.md2orchestra.Md2Orchestra - Md2Orchestra: exception occurred java.lang.NumberFormatException: Zero length BigInteger at java.math.BigInteger.
(BigInteger.java:485) ~[?:?] at java.math.BigInteger. (BigInteger.java:673) ~[?:?] at com.sun.xml.bind.DatatypeConverterImpl._parseInteger(DatatypeConverterImpl.java:61) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$22.parse(RuntimeBuiltinLeafInfoImpl.java:766) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$22.parse(RuntimeBuiltinLeafInfoImpl.java:764) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:209) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.startElement(StructureLoader.java:182) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:547) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:526) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.java:138) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:518) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2725) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[?:?] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:541) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[?:?] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224) ~[?:?] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:635) ~[?:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:228) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:199) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:170) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:209) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.RepositoryBuilder.unmarshal(RepositoryBuilder.java:946) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.RepositoryBuilder. (RepositoryBuilder.java:87) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:241) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:222) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:143) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.main(Md2Orchestra.java:104) [md2orchestra-0.1.0-jar-with-dependencies.jar:?]
@nngakosso I reproduced the problem with EP 256. The problem was with a minor defect in the Orchestra reference file that prevented it from being parsed - an id attribute was blank, so it failed to parse as numeric. This was corrected in EP 257 which can be obtained from fixtrading.org or from GitHub as FIX Latest. When I used that file, md2orchestra ran to completion. (I think had manually corrected the previous file for testing but forgot that I had done that.)
I'm running on java 14 maybe that's why? I got this error with both your file and the murex.md file I got
C:\Users\nngakosso\Documents\tablature\md2orchestra\target>java -jar md2orchestra-0.1.0-jar-with-dependencies.jar -i output.md -r OrchestraFIXLatest.xml -o output.xml WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance. line 1:0 mismatched input '
' expecting {HEADINGLINE, LISTLINE, PARAGRAPHLINE, NEWLINE, CELLTEXT} 17:09:35.420 [main] ERROR io.fixprotocol.md.event.DocumentParser.SyntaxErrorListener - Markdown parser failed at line 1 position 0 due to mismatched input ' ' expecting {HEADINGLINE, LISTLINE, PARAGRAPHLINE, NEWLINE, CELLTEXT} 17:09:35.426 [main] FATAL io.fixprotocol.md2orchestra.Md2Orchestra - Md2Orchestra: exception occurred java.io.IOException: Markdown parser failed; 1 at io.fixprotocol.md.event.DocumentParser.parse(DocumentParser.java:52) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:246) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:222) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.generate(Md2Orchestra.java:143) ~[md2orchestra-0.1.0-jar-with-dependencies.jar:?] at io.fixprotocol.md2orchestra.Md2Orchestra.main(Md2Orchestra.java:104) [md2orchestra-0.1.0-jar-with-dependencies.jar:?]
I still try to figure out why I doesn't work for me but for you.
Those are the files I'm using you should already have it. murex.zip output.zip
I got this error:
10:55:01.722 [main] ERROR io.fixprotocol.md2orchestra.RepositoryBuilder - RepositoryBuilder unknown groupRef id; name=PtysSubGrp
But I've been able to generate the orchestra files with both files now.
Closing. Open a new issue for any specific anomalies.
Hello I restested tablature and I dont know why I cant get m2orchestra to work properly. Even with files generated from orchestra2md, which works perfectly. I still have a blank file anyway.
I got this error on IntelliJ: