Hi, Does it also happen if you use a more recent version of H2? According to the error code, you are using a version from 2010.
Regards, Thomas On Tue, Jul 16, 2013 at 1:22 PM, Kornel <[email protected]> wrote: > Hello. > I have the env variable JAVA_TOOL_OPTIONS set to -Dfile.encoding=UTF8. > JAVA_TOOL_OPTIONS are always printed by the jvm to stderr. The following > command executed in the web interface: > > CREATE ALIAS NEXT_PRIME AS $$ > String nextPrime(String value) { > return new BigInteger(value).nextProbablePrime().toString(); > } > $$; > > Causes an error: > > CREATE ALIAS NEXT_PRIME AS $$ > String nextPrime(String value) { > return new BigInteger(value).nextProbablePrime().toString(); > } > $$; > Blad skladniowy w wyrazeniu SQL "Picked up JAVA_TOOL_OPTIONS: > -Dfile.encoding=UTF8 > " > Syntax error in SQL statement "Picked up JAVA_TOOL_OPTIONS: > -Dfile.encoding=UTF8 > "; SQL statement: > CREATE ALIAS NEXT_PRIME AS $$ > String nextPrime(String value) { > return new BigInteger(value).nextProbablePrime().toString(); > } > $$ > [42000-144]<http://localhost:11111/query.do?jsessionid=7566aafdd3c54b3e9a8672f8b0b65298#> > 42000/42000 > (Help)<http://h2database.com/javadoc/org/h2/constant/ErrorCode.html#c42000> > > The polish text Blad skladniowy w wyrazeniu > SQL<http://localhost:11111/query.do?jsessionid=7566aafdd3c54b3e9a8672f8b0b65298#> > says > as much as Syntax error in SQL > statement<http://localhost:11111/query.do?jsessionid=7566aafdd3c54b3e9a8672f8b0b65298#>. > After removing JAVA_TOOL_OPTIONS the CREATE ALIAS works as expected. > > Seems like a bug. > > Regards, > Kornel > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/groups/opt_out.
