The error message is meaningless for now. No useful details. It appeared here for the first time when the SUBSTRING function appeared in a query. This feature is also known in Firebird, but Firebird does not allow the comma-separated shorthand notation that is possible with HSQLDB. Instead you have to rewrite to SUBSTRING (s FROM start [FOR len]).