Issue between version 1.4.188 and 1.4.189

171 views
Skip to first unread message

IntensiveH2

unread,
Sep 16, 2015, 5:14:09 AM9/16/15
to H2 Database
Hello,

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.

Do you have a workaround helping me?

Regards

Thomas Mueller

unread,
Sep 16, 2015, 12:04:12 PM9/16/15
to h2-da...@googlegroups.com
Hi,

I don't know what the problem could be. Could you send me the database file please?

Regards,
Thomas
--
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 h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

IntensiveH2

unread,
Sep 17, 2015, 2:03:30 AM9/17/15
to H2 Database
Hello Thomas,

I attached a zip file (please, remove the .aaa extension). This DB is created with version 1.4.188.

Thanks.
cockpit.h2.db.zip.aaa

Steve McLeod

unread,
Sep 18, 2015, 3:02:29 AM9/18/15
to H2 Database
What's the username/password for this H2 database?

I ask because I did some work in the DateTimeUtils class that was merged into the latest release, and I'd like to double check with your database that my code is not at fault here.

IntensiveH2

unread,
Sep 18, 2015, 3:30:12 AM9/18/15
to H2 Database
Hello Steve,

I attached a new DB with user = 'DBCOCKPIT' and pwd = 'xx'.
Note:
As explained previously, I have an issue with query like below (I mean without any binding)
SELECT min(A0.startdate) FROM MCJOBHISTORY A0 
In this case, I guess that my code is not the root cause of the issue.

Regards

On Wednesday, September 16, 2015 at 11:14:09 AM UTC+2, IntensiveH2 wrote:
cockpit.h2.db.zip

Thomas Mueller

unread,
Sep 18, 2015, 12:12:07 PM9/18/15
to h2-da...@googlegroups.com
Hi,

I don't know, it works for me.

SELECT id, startdate, enddate FROM MCJOBHISTORY;
-- 3 rows
select id, updatedate from MCPRODINSTANCE;
-- 9 rows

SELECT min(A0.startdate) FROM MCJOBHISTORY A0
-- 2015-09-17 16:00:00.023

CREATE_BUILD is 188, where the h2.storeLocalTime problem was not fixed yet (but that shouldn't be a problem either).

Regards,
Thomas

IntensiveH2

unread,
Sep 21, 2015, 3:49:57 AM9/21/15
to H2 Database
Unfortunately, when I created the latest DB, the version was 188 and I guess that my issue is due to a version below 188.
I will continue the investigation to reproduce the issue.
I will keep you informed.


On Wednesday, September 16, 2015 at 11:14:09 AM UTC+2, IntensiveH2 wrote:
Reply all
Reply to author
Forward
0 new messages