View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005092 | SymmetricDS | Bug | public | 2021-09-28 14:31 | 2021-11-04 14:58 |
Reporter | emiller | Assigned To | pmarzullo | ||
Priority | normal | ||||
Status | closed | Resolution | fixed | ||
Product Version | 3.12.11 | ||||
Target Version | 3.12.12 | Fixed in Version | 3.12.12 | ||
Summary | 0005092: Lexical error when issuing a foreign key correction with a carriage return in the data | ||||
Description | When issuing a foreign key correction, if a carriage return appears in the data, the following error can occur: 2021-09-21 17:03:35,201 INFO [MIDB-midb] [DefaultDatabaseWriter] [midb-midb-dataloader-10] Failed to process bsh event in batch server-19486 on channel 'config'. Failed row data was: "try { engine.getDataService().sendMissingForeignKeyRowsForLoad(211, \"server\", 1, \"\\\"10031000000523\\\",\\\"SA \\\",\\\"SA\\\",\\\"RDY \\\",\\\"Z \\\",\\\"6\\\",\\\"Z \\\",\\\"U \\\",\\\"jagadmin\\\",\\\"N\\\",\\\"B\\\",\\\"OPR\\\",\\\"M\\\",\\\"A\\\",\\\"20071016093322\\\",\\\"20071016093322\\\",\\\"20071016\\\",\\\"MOD\\\",\\\"U\\\",,,,,,,,\\\"C4I \\\",,,,,,,,,,,,,\\\"0444\\\",,,,,,\\\"39RTM0923799271\\\",,\\\"SOGPU----------\\\",\\\"TEST\\\",\\\"10031\\\",\\\"jagadmin\\\",\\\"20071016093322\\\",\\\" \\\",\\\"US\\\",\\\"UN10031000000523\\\",\\\"G\\\",,,,,,,,,\"); } catch (Exception e) { }" StackTraceKey.init [RuntimeException:135661806] java.lang.RuntimeException: Sourced file: inline evaluation of: ``try { engine.getDataService().sendMissingForeignKeyRowsForLoad(211, "server", 1, . . . '' Token Parsing Error: Lexical error at line 1, column 405. Encountered: "\r" (13), after : "\"\\\"10031000000523\\\",\\\"SA \\\",\\\"SA\\\",\\\"RDY \\\",\\\"Z \\\",\\\"6\\\",\\\"Z \\\",\\\"U \\\",\\\"jagadmin\\\",\\\"N\\\",\\\"B\\\",\\\"OPR\\\",\\\"M\\\",\\\"A\\\",\\\"20071016093322\\\",\\\"20071016093322\\\",\\\"20071016\\\",\\\"MOD\\\",\\\"U\\\",,,,,,,,\\\"C4I \\\",,,,,,,,,,,,,\\\"0444\\\",,,,,,\\\"39RTM0923799271\\\",,\\\"SOGPU----------\\\",\\\"TEST\\\",\\\"10031\\\",\\\"jagadmin\\\",\\\"20071016093322\\\",\\\"": <at unknown location> at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.script(AbstractDatabaseWriter.java:479) at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:202) at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64) at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:84) at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64) at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:202) at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:212) at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:178) at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:124) at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1091) at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener$2.call(DataLoaderService.java:1067) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: Sourced file: inline evaluation of: ``try { engine.getDataService().sendMissingForeignKeyRowsForLoad(211, "server", 1, . . . '' Token Parsing Error: Lexical error at line 1, column 405. Encountered: "\r" (13), after : "\"\\\"10031000000523\\\",\\\"SA \\\",\\\"SA\\\",\\\"RDY \\\",\\\"Z \\\",\\\"6\\\",\\\"Z \\\",\\\"U \\\",\\\"jagadmin\\\",\\\"N\\\",\\\"B\\\",\\\"OPR\\\",\\\"M\\\",\\\"A\\\",\\\"20071016093322\\\",\\\"20071016093322\\\",\\\"20071016\\\",\\\"MOD\\\",\\\"U\\\",,,,,,,,\\\"C4I \\\",,,,,,,,,,,,,\\\"0444\\\",,,,,,\\\"39RTM0923799271\\\",,\\\"SOGPU----------\\\",\\\"TEST\\\",\\\"10031\\\",\\\"jagadmin\\\",\\\"20071016093322\\\",\\\"": <at unknown location> at bsh.Interpreter.eval(Interpreter.java:710) at bsh.Interpreter.eval(Interpreter.java:750) at bsh.Interpreter.eval(Interpreter.java:739) at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.script(AbstractDatabaseWriter.java:476) ... 14 more Caused by: bsh.TokenMgrError: Lexical error at line 1, column 405. Encountered: "\r" (13), after : "\"\\\"10031000000523\\\",\\\"SA \\\",\\\"SA\\\",\\\"RDY \\\",\\\"Z \\\",\\\"6\\\",\\\"Z \\\",\\\"U \\\",\\\"jagadmin\\\",\\\"N\\\",\\\"B\\\",\\\"OPR\\\",\\\"M\\\",\\\"A\\\",\\\"20071016093322\\\",\\\"20071016093322\\\",\\\"20071016\\\",\\\"MOD\\\",\\\"U\\\",,,,,,,,\\\"C4I \\\",,,,,,,,,,,,,\\\"0444\\\",,,,,,\\\"39RTM0923799271\\\",,\\\"SOGPU----------\\\",\\\"TEST\\\",\\\"10031\\\",\\\"jagadmin\\\",\\\"20071016093322\\\",\\\"" at bsh.ParserTokenManager.getNextToken(ParserTokenManager.java:2130) at bsh.Parser.jj_scan_token(Parser.java:5986) at bsh.Parser.jj_3R_138(Parser.java:4702) at bsh.Parser.jj_3R_129(Parser.java:4679) at bsh.Parser.jj_3R_98(Parser.java:5046) at bsh.Parser.jj_3R_57(Parser.java:5026) at bsh.Parser.jj_3R_33(Parser.java:5103) at bsh.Parser.jj_3R_107(Parser.java:4171) at bsh.Parser.jj_3R_70(Parser.java:4235) at bsh.Parser.jj_3R_39(Parser.java:4227) at bsh.Parser.jj_3R_147(Parser.java:4270) at bsh.Parser.jj_3R_134(Parser.java:4289) at bsh.Parser.jj_3R_106(Parser.java:4295) at bsh.Parser.jj_3R_69(Parser.java:4309) at bsh.Parser.jj_3R_146(Parser.java:4707) at bsh.Parser.jj_3R_132(Parser.java:4779) at bsh.Parser.jj_3R_104(Parser.java:4849) at bsh.Parser.jj_3R_58(Parser.java:4955) at bsh.Parser.jj_3R_33(Parser.java:5107) at bsh.Parser.jj_3_8(Parser.java:4154) at bsh.Parser.jj_2_8(Parser.java:3758) at bsh.Parser.Expression(Parser.java:1064) at bsh.Parser.StatementExpression(Parser.java:2864) at bsh.Parser.Statement(Parser.java:2698) at bsh.Parser.BlockStatement(Parser.java:2819) at bsh.Parser.Block(Parser.java:2779) at bsh.Parser.TryStatement(Parser.java:3653) at bsh.Parser.Statement(Parser.java:2738) at bsh.Parser.BlockStatement(Parser.java:2819) at bsh.Parser.Line(Parser.java:172) at bsh.Interpreter.Line(Interpreter.java:1011) at bsh.Interpreter.eval(Interpreter.java:641) ... 17 more | ||||
Tags | No tags attached. | ||||
|
Any carriage returns or newlines in the values of the row that is being sent need to be converted to "\r" and "\n" respectively so that the bean shell interpreter can successfully run the bean shell script. The values are sent as a comma delimited string and used in the bean shell interpreter as a string object. Converting to "\r" and "\n" will allow the interpreter to correctly parse the bean shell script. |
|
patch provided here: https://www.jumpmind.com/downloads/symmetricds/patches/3.12/patch-0005092.jar |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-09-28 14:31 | emiller | New Issue | |
2021-09-28 14:31 | emiller | Status | new => assigned |
2021-09-28 14:31 | emiller | Assigned To | => emiller |
2021-09-28 20:33 | pmarzullo | Note Added: 0002005 | |
2021-09-28 20:39 | pmarzullo | Assigned To | emiller => pmarzullo |
2021-09-28 20:40 | pmarzullo | Status | assigned => resolved |
2021-09-28 20:40 | pmarzullo | Resolution | open => fixed |
2021-09-28 20:40 | pmarzullo | Fixed in Version | => 3.12.12 |
2021-09-28 20:40 | pmarzullo | Note Added: 0002006 | |
2021-09-28 21:00 | pmarzullo | Changeset attached | => SymmetricDS 3.12 8d5aaf13 |
2021-11-04 14:58 | admin | Status | resolved => closed |