Since I use the version 1.4.189 with an existing DB created with version 1.4.188 (option like MVCC=TRUE;AUTOCOMMIT=OFF;LOCK_MODE=3;LOG=2;CACHE_TYPE=SOFT_LRU;MV_STORE=FALSE ), I have a lot of issue with column of kind datetime
INFO | jvm 1 | 2015/09/16 10:25:32 | org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "8"; SQL statement:
INFO | jvm 1 | 2015/09/16 10:25:32 | SELECT A0.idmcprodinstance,A0.id FROM MCJOBHISTORY A0 LEFT OUTER JOIN MCPRODINSTANCE A1 ON A0.idmcprodinstance=A1.id WHERE ( (A0.processendstatus <> ? OR (A0.jobreturncode <> ?)) AND A0.idmcprodinstance IS NOT NULL ) AND ((A1.lastacknowledge IS NULL OR (A0.enddate > A1.lastacknowledge)) AND A0.enddate >= ?) [22007-189]
....
INFO | jvm 1 | 2015/09/16 10:25:34 | 2015/09/16 10:25:34 ERROR [pperListener_start_runner] mserver.H2Listener (com.infovista.mserver.H2Listener:H2Listener.java:exceptionThrown:57)
INFO | jvm 1 | 2015/09/16 10:25:34 | [DATABASE] exceptionThrown sql=SELECT min(A0.startdate) FROM MCJOBHISTORY A0
INFO | jvm 1 | 2015/09/16 10:25:34 | org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "0"; SQL statement:
INFO | jvm 1 | 2015/09/16 10:25:34 | SELECT min(A0.startdate) FROM MCJOBHISTORY A0 [22007-189]
INFO | jvm 1 | 2015/09/16 10:25:34 | at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
.....
INFO | jvm 1 | 2015/09/16 10:25:34 | Caused by: java.lang.IllegalArgumentException: 0
INFO | jvm 1 | 2015/09/16 10:25:34 | at org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:303)
INFO | jvm 1 | 2015/09/16 10:25:34 | at org.h2.value.ValueTimestamp.parseTry(ValueTimestamp.java:140)
INFO | jvm 1 | 2015/09/16 10:25:34 | at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:120)
with
create table MCJobHistory (
id int not null,
parametersString varchar(20000) null,
idMCProdInstance int null,
startDate datetime null,
endDate datetime null,
......
Maybe it's due to recent change to h2.storeLocalTime.
Nevertheless this issue is very annoying for me because the only way is to migrate data.