Anybody ever seen any issue with starting H2 database during startup? I'm seeing an odd issue where db-seed cannot succeed due to a TIMESTAMP constraint but I cannot find a table in the db that has TIMESTAMP as part of its table. I'm not sure where the db-seed is or if I need to add a column to a table some where. I've tried using a different H2 table, deleting the tables, and reboot the whole box to remove all the db tables from memory and /tmp.
Here's the error message I'm seeing:
Exception in thread "main" org.jooq.exception.DataAccessException: SQL [insert into groups (id, name, createdat, updatedat) values (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint))]; Cannot parse "TIMESTAMP" constant "1340289489"; SQL statement:
insert into groups (id, name, createdat, updatedat) values (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)) -- (CAST(?1 AS BIGINT), CAST(?2 AS VARCHAR), CAST(?3 AS BIGINT), CAST(?4 AS BIGINT)) [22007-187]
at org.jooq.impl.Utils.translate(Utils.java:1645)
at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:661)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:356)
at org.jooq.impl.AbstractDelegatingQuery.execute(AbstractDelegatingQuery.java:133)
at keywhiz.commands.DbSeedCommand.doImport(DbSeedCommand.java:88)
at keywhiz.commands.DbSeedCommand.run(DbSeedCommand.java:70)
at keywhiz.commands.DbSeedCommand.run(DbSeedCommand.java:50)
at io.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:76)
at io.dropwizard.cli.Cli.run(Cli.java:70)
at io.dropwizard.Application.run(Application.java:73)
at keywhiz.KeywhizService.main(KeywhizService.java:71)
Caused by: org.h2.jdbc.JdbcSQLException: Cannot parse "TIMESTAMP" constant "1340289489"; SQL statement:
insert into groups (id, name, createdat, updatedat) values (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)), (cast(? as bigint), cast(? as varchar), cast(? as bigint), cast(? as bigint)) -- (CAST(?1 AS BIGINT), CAST(?2 AS VARCHAR), CAST(?3 AS BIGINT), CAST(?4 AS BIGINT)) [22007-187]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:122)
at org.h2.value.Value.convertTo(Value.java:862)
at org.h2.table.Column.convert(Column.java:148)
at org.h2.command.dml.Insert.insertRows(Insert.java:143)
at org.h2.command.dml.Insert.update(Insert.java:114)
at org.h2.command.CommandContainer.update(CommandContainer.java:78)
at org.h2.command.Command.executeUpdate(Command.java:254)
at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:198)
at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:194)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:410)
at org.jooq.impl.AbstractDMLQuery.execute(AbstractDMLQuery.java:276)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:342)
... 8 more
Caused by: java.lang.IllegalArgumentException: 1340289489
at org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:275)
at org.h2.value.ValueTimestamp.parseTry(ValueTimestamp.java:140)
at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:120)
... 19 more