schierlm/BibleMultiConverter

ZefaniaXML to Mysword: ArrayIndexOutOfBoundsException

eleius opened this issue · 2 comments

Just wanted to report that I cloned from git (also tried the v0.0.8 release) and tried to convert a zefania xml module I found, but it failed with exception ArrayIndexOutOfBoundsException:

java -jar BibleMultiConverter-AllInOneEdition.jar ZefaniaXML LND.xml MySword

WARNING: Schema validation failed: 
	[Error] org.xml.sax.SAXParseException; systemId: file:/test/LND.xml; lineNumber: 2; columnNumber: 195; cvc-complex-type.3.2.2: Attribute 'lgid' is not allowed to appear in element 'XMLBIBLE'.
	[Error] org.xml.sax.SAXParseException; systemId: file:/test/LND.xml; lineNumber: 30; columnNumber: 20; cvc-datatype-valid.1.2.1: '1991' is not a valid value for 'date'.
	[Error] org.xml.sax.SAXParseException; systemId: file:/test/LND.xml; lineNumber: 30; columnNumber: 20; cvc-type.3.1.3: The value '1991' of element 'date' is not valid.
WARNING: Parsing anyway after validation errors
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
	at biblemulticonverter.sqlite.format.MySword.doExport(MySword.java:320)
	at biblemulticonverter.Main.main(Main.java:67)

Hello eleius,

Thanks for the report. I see, I really have to improve the argument parsing and error handling.

If you add an output filename for the MySword format to the end of the command line, the exception should go away.

Yes, I totally forgot about the output filename. It works now. Thanks!