I have not been able to replicate the issue, I have made changes that I think will fix the issue and uploaded to Git Hub. (https://github.com/bmTas/JRecord) let me know and I will uploaded the latest jars
I will look at the issue and fix. I think I know what the issue is and will issue a fix. But try using IO_STANDARD_UNICODE_TEXT_FILE instead of IO_TEXT_LINE that should solve the issue. In JRecord there are ways to read a Text file As bytes (IO_BIN_TEXT forces this). As Characters then convert to bytes (IO_STANDARD_UNICODE_TEXT_FILE forces this) Constants.IO_TEXT_LINE will choose which ever it thinks is appropriate (basically the encoding). For the most part they work the same, IO_BIN_TEXT solves...
The AbstractLineReader throws below error on parsing a given text dataset file when running the SpringBoot application in standalone mode(java -jar spring_boot_app.jar) on windows platform. java.lang.NegativeArraySizeException: -7240 at net.sf.JRecord.ByteIO.BaseByteTextReader.read(BaseByteTextReader.java:174) at net.sf.JRecord.IO.LineReaderWrapper.readImplementation(LineReaderWrapper.java:96) at net.sf.JRecord.IO.AbstractLineReader.read(AbstractLineReader.java:176) This is the reader constructor:...
The AbstractLineReader throws below error on parsing a given text dataset file when running the SpringBoot application in standalone mode(java -jar spring_boot_app.jar) on windows platform. java.lang.NegativeArraySizeException: -7240 at net.sf.JRecord.ByteIO.BaseByteTextReader.read(BaseByteTextReader.java:174) at net.sf.JRecord.IO.LineReaderWrapper.readImplementation(LineReaderWrapper.java:96) at net.sf.JRecord.IO.AbstractLineReader.read(AbstractLineReader.java:176) This is the reader constructor:...
The AbstractLineReader throws below error on parsing a given text dataset file when running the SpringBoot application in standalone mode(java -jar spring_boot_app.jar) on windows platform. java.lang.NegativeArraySizeException: -7240 at net.sf.JRecord.ByteIO.BaseByteTextReader.read(BaseByteTextReader.java:174) at net.sf.JRecord.IO.LineReaderWrapper.readImplementation(LineReaderWrapper.java:96) at net.sf.JRecord.IO.AbstractLineReader.read(AbstractLineReader.java:176) This is the reader constructor:...
This was the code I was used to process the file: private String dataFile = "/Volumes/BruceMacSSD/Work/UserData/Andy/QA/QA_DEPENDING_DATA.dat"; private String copybookName = "/Volumes/BruceMacSSD/Work/UserData/Andy/QA/QA_DEPENDING_CBL.cpy"; /** * Example of LineReader classes */ public ReadQaDependingCbl() { super(); AbstractLine line; int lineNum = 0; try { ICobolIOBuilder iob = JRecordInterface1.COBOL .newIOBuilder(copybookName) .setCopybookFileFormat(Cb2xmlConstants.USE_STANDARD_COLUMNS) .setFont("cp037")...
I have updated JRecord on Github: https://github.com/bmTas/JRecord To handle multi-byte character sets with in Continuous files. (There is a new Reader class Is it OK if I use files / copybooks you supplied in my automated test ???
IO_BIN_TEXT is for reading single byte Text files (ASCII, Ebcdic etc). I would suggest trying running with a font (encoding) of Conversion.getDefaultSingleByteCharacterset(). There is a problem in the continuos reader with a multi byte encoding's like utf-8 (if there are multi-byte characters). I will fix this problem. i.e. ICobolIOBuilder iob = JRecordInterface1.COBOL .newIOBuilder(copybookName) .setCopybookFileFormat(Cb2xmlConstants.USE_STANDARD_COLUMNS) .setFont(Conversion.getDefaultSingleByteCharacterset())...