java.lang.RuntimeException

tip

Check if you're not creating unused SQL entities, as it might cause this exception.


rafael

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

  • GitHub comment 315#233986907
    via GitHub by thomasmueller
    ,
  • CachedRowSet Support
    via by da...@dandymadeproductions.com,
  • Method add of DyTasks fail
    via GitHub by oruam85
    ,
    • java.lang.RuntimeException: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not prepare statement at com.scanii.web.models.daos.AbstractDAO.commit(AbstractDAO.java:37) at com.scanii.web.NoniBaseTest.createUser(NoniBaseTest.java:67) at com.scanii.web.DashboardSeleniumTest.before(DashboardSeleniumTest.java:36) 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:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runners.Suite.runChild(Suite.java:127) at org.junit.runners.Suite.runChild(Suite.java:26) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74) Caused by: javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: could not prepare statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:764) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:737) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:742) at com.scanii.web.models.daos.AbstractDAO.persist(AbstractDAO.java:18) at com.scanii.web.NoniBaseTest.lambda$createUser$0(NoniBaseTest.java:67) at com.scanii.web.models.daos.AbstractDAO.commit(AbstractDAO.java:31) ... 34 more Caused by: org.hibernate.exception.GenericJDBCException: could not prepare statement at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:182) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:72) at org.hibernate.id.enhanced.SequenceStructure$1.getNextValue(SequenceStructure.java:94) at org.hibernate.id.enhanced.NoopOptimizer.generate(NoopOptimizer.java:40) at org.hibernate.id.enhanced.SequenceStyleGenerator.generate(SequenceStyleGenerator.java:412) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:105) at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:67) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:58) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:757) ... 39 more Caused by: org.h2.jdbc.JdbcSQLException: Sequence "hibernate_sequence" not found; SQL statement: call next value for hibernate_sequence [90036-192] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.command.Parser.readSequence(Parser.java:5438) at org.h2.command.Parser.readTerm(Parser.java:2821) at org.h2.command.Parser.readFactor(Parser.java:2320) at org.h2.command.Parser.readSum(Parser.java:2307) at org.h2.command.Parser.readConcat(Parser.java:2277) at org.h2.command.Parser.readCondition(Parser.java:2127) at org.h2.command.Parser.readAnd(Parser.java:2099) at org.h2.command.Parser.readExpression(Parser.java:2091) at org.h2.command.Parser.parseCall(Parser.java:4477) at org.h2.command.Parser.parsePrepared(Parser.java:364) at org.h2.command.Parser.parse(Parser.java:317) at org.h2.command.Parser.parse(Parser.java:289) at org.h2.command.Parser.prepareCommand(Parser.java:254) at org.h2.engine.Session.prepareLocal(Session.java:560) at org.h2.engine.Session.prepareCommand(Session.java:501) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1202) at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:73) at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:290) at com.zaxxer.hikari.proxy.ConnectionProxy.prepareStatement(ConnectionProxy.java:263) at com.zaxxer.hikari.proxy.ConnectionJavassistProxy.prepareStatement(ConnectionJavassistProxy.java) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$1.doPrepare(StatementPreparerImpl.java:87) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:172) ... 49 more

    Users with the same issue

    arnaudt
    3 times, last one,
    batwalrus76
    4 times, last one,
    Handemelindo
    1 times, last one,
    rocday
    3 times, last one,
    Andreas Häber
    1 times, last one,
    145 more bugmates