Hello,
Running the following insert statement in the H2 console:
INSERT INTO mytable VALUES(hash ('SHA3-256', X'0102'));
works as expected. However, running the same statement in a script used in the JDBC connection string, as follows:
@DataSourceDefinition(
name = "java:global/H2",
className = "org.h2.jdbcx.JdbcDataSource",
url = "jdbc:h2:mem:test;DB_CLOSE_ON_EXIT=FALSE;INIT=runscript from '~/init.sql'"
raises the following exception:
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Connection could not be allocated because: Invalid value "SHA3-256" for parameter "algorithm"; SQL statement:
INSERT INTO caller VALUES(HASH ('SHA3-256',X'0102')) [90008-200]
What should I do such that the same SQL statement works the same whether ran in the console or in a Java class ?
Many thanks in advance.
Nicolas