javax.persistence.PersistenceException

Query threw SQLException:Nie można odczytać "TIMESTAMP" jako "1" Cannot parse "TIMESTAMP" constant "1"; SQL statement: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7 from c_user_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and t0.id = ? [22007-189] Bind values:[1] Query was: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7 from c_user_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and t0.id = ?

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web1408

  • via Google Groups by Krzysztof Chudy, 9 months ago
    Query threw SQLException:Nie można odczytać "TIMESTAMP" jako "1" Cannot parse "TIMESTAMP" constant "1"; SQL statement: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7
  • Query threw SQLException:Nie można odczytać "TIMESTAMP" jako "1" Cannot parse "TIMESTAMP" constant "1"; SQL statement: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7
  • via Stack Overflow by Janus Troelsen
    , 1 year ago
    Query threw SQLException:Parameter "#1" is not set; SQL statement: select t0.virtuelle_adresse c0, t0.reale_adresse c1, t0.betr_nr c2, t0.bemerkung c3, t0.inbetriebnahme c4, t0.dekoder_typ_id c5, t0.model_tfz_typ_id c6, t0.eigentuemer_id c7 from
  • Stack trace

    • javax.persistence.PersistenceException: Query threw SQLException:Nie można odczytać "TIMESTAMP" jako "1" Cannot parse "TIMESTAMP" constant "1"; SQL statement: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7 from c_user_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and t0.id = ? [22007-189] Bind values:[1] Query was: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7 from c_user_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and t0.id = ? at com.avaje.ebeaninternal.server.query.CQuery.createPersistenceException(CQuery.java:662) at com.avaje.ebeaninternal.server.query.CQuery.createPersistenceException(CQuery.java:642) at com.avaje.ebeaninternal.server.query.CQueryEngine.find(CQueryEngine.java:377) at com.avaje.ebeaninternal.server.query.DefaultOrmQueryEngine.findId(DefaultOrmQueryEngine.java:135) at com.avaje.ebeaninternal.server.core.OrmQueryRequest.findId(OrmQueryRequest.java:300) at com.avaje.ebeaninternal.server.core.DefaultServer.findId(DefaultServer.java:1037) at com.avaje.ebeaninternal.server.core.DefaultServer.findUnique(DefaultServer.java:1051) at com.avaje.ebeaninternal.server.querydefn.DefaultOrmQuery.findUnique(DefaultOrmQuery.java:1090) at com.avaje.tests.history.TestHistoryInsert.test(TestHistoryInsert.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102) at org.apache.maven.surefire.Surefire.run(Surefire.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021) Caused by: org.h2.jdbc.JdbcSQLException: Nie można odczytać "TIMESTAMP" jako "1" Cannot parse "TIMESTAMP" constant "1"; SQL statement: select t0.id c0, t0.inactive c1, t0.name c2, t0.email c3, t0.version c4, t0.when_created c5, t0.when_modified c6, t0.group_id c7 from c_user_with_history t0 where (t0.sys_period_start <= ? and (t0.sys_period_end is null or t0.sys_period_end > ?)) and t0.id = ? [22007-189] 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.expression.Comparison.getValue(Comparison.java:256) at org.h2.expression.ConditionAndOr.getValue(ConditionAndOr.java:93) at org.h2.expression.Expression.getBooleanValue(Expression.java:178) at org.h2.command.dml.Select.queryFlat(Select.java:533) at org.h2.command.dml.Select.queryWithoutCache(Select.java:643) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.SelectUnion.queryWithoutCache(SelectUnion.java:194) at org.h2.command.dml.SelectUnion.query(SelectUnion.java:425) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.index.ViewIndex.find(ViewIndex.java:272) at org.h2.index.ViewIndex.find(ViewIndex.java:177) at org.h2.index.BaseIndex.find(BaseIndex.java:127) at org.h2.index.IndexCursor.find(IndexCursor.java:159) at org.h2.table.TableFilter.next(TableFilter.java:329) at org.h2.command.dml.Select.queryFlat(Select.java:531) at org.h2.command.dml.Select.queryWithoutCache(Select.java:643) at org.h2.command.dml.Query.query(Query.java:322) at org.h2.command.dml.Query.query(Query.java:290) at org.h2.command.dml.Query.query(Query.java:36) at org.h2.command.CommandContainer.query(CommandContainer.java:90) at org.h2.command.Command.executeQuery(Command.java:196) at org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:108) at org.avaje.datasource.pool.ExtendedPreparedStatement.executeQuery(ExtendedPreparedStatement.java:121) at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQueryWithOption(CQuery.java:342) at com.avaje.ebeaninternal.server.query.CQuery.prepareBindExecuteQuery(CQuery.java:295) at com.avaje.ebeaninternal.server.query.CQueryEngine.find(CQueryEngine.java:354) ... 33 more Caused by: java.lang.IllegalArgumentException: 1 at org.h2.util.DateTimeUtils.parseDateValue(DateTimeUtils.java:303) at org.h2.value.ValueTimestamp.parseTry(ValueTimestamp.java:140) at org.h2.value.ValueTimestamp.parse(ValueTimestamp.java:120) ... 61 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Once, 3 months ago