Hello, I am currently working on a Java library that utilizes GeoTools 21.0 extensively. While writing test cases, I came across two bugs that are related but different.
Firstly, when I tried inserting features into H2 database, it throws up the error shown below *Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorcontainException: Syntax error in SQL statement "SYSTEM_SEQUENCE_96DAD715_3012_4565_B27B_C24E9DD9101E[*]"""; SQL statement:* *SELECT CURRVAL('SYSTEM_SEQUENCE_96DAD715_3012_4565_B27B_C24E9DD9101E"') [42000-199]* * at org.h2.message.DbException.getJdbcSQLException(DbException.java:451)* * at org.h2.message.DbException.getJdbcSQLException(DbException.java:427)* * at org.h2.message.DbException.get(DbException.java:205)* * at org.h2.message.DbException.get(DbException.java:181)* * at org.h2.message.DbException.getSyntaxError(DbException.java:229)* * at org.h2.command.Parser.getSyntaxError(Parser.java:989)* * at org.h2.command.Parser.checkRunOver(Parser.java:5129)* * at org.h2.command.Parser.initialize(Parser.java:5069)* * at org.h2.command.Parser.parseExpression(Parser.java:8162)* * at org.h2.expression.function.Function.getSequence(Function.java:1773)* * at org.h2.expression.function.Function.getValueWithArgs(Function.java:1539)* * at org.h2.expression.function.Function.getValue(Function.java:607)* * at org.h2.command.dml.Select$LazyResultQueryFlat.fetchNextRow(Select.java:1890)* * at org.h2.result.LazyResult.hasNext(LazyResult.java:101)* * at org.h2.result.LazyResult.next(LazyResult.java:60)* * at org.h2.command.dml.Select.queryFlat(Select.java:742)* Apparently, the name of the sequence will always have an extra quote attached to it due to a sub-string miscalculation. This problem is also present in versions 20.0 and 22-SNAPSHOT. I was able to fix the issue and ready to provide the patch. However, this is little compared to the second issue which i would outline in a follow up mail.
_______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users