org.h2.jdbc.JdbcSQLException

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.

  • jsf - JSF com Wildfly 8 404 - Not Found
    via by Unknown author,
  • [ConnectionsReleaseTest|https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/test/java/org/hibernate/test/schemaupdate/ConnectionsReleaseTest.java] fails on most databases (db2, mssql, oracle, postgresql, sybase). example failure - db2: {noformat} org.hibernate.exception.GenericJDBCException: Error creating DatabaseInformation for schema validation at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:95) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:84) at org.hibernate.test.schemaupdate.ConnectionsReleaseTest.testSchemaValidatorReleasesAllConnections(ConnectionsReleaseTest.java:86) 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.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74) Caused by: org.h2.jdbc.JdbcSQLException: Schema "SYS" not found; SQL statement: select name from sys.sequences [90079-176] at org.h2.message.DbException.getJdbcSQLException(DbException.java:344) at org.h2.message.DbException.get(DbException.java:178) at org.h2.message.DbException.get(DbException.java:154) at org.h2.command.Parser.getSchema(Parser.java:655) at org.h2.command.Parser.getSchema(Parser.java:662) at org.h2.command.Parser.readTableFilter(Parser.java:1186) at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1859) at org.h2.command.Parser.parseSelectSimple(Parser.java:1968) at org.h2.command.Parser.parseSelectSub(Parser.java:1853) at org.h2.command.Parser.parseSelectUnion(Parser.java:1674) at org.h2.command.Parser.parseSelect(Parser.java:1662) at org.h2.command.Parser.parsePrepared(Parser.java:434) at org.h2.command.Parser.parse(Parser.java:306) at org.h2.command.Parser.parse(Parser.java:278) at org.h2.command.Parser.prepareCommand(Parser.java:243) at org.h2.engine.Session.prepareLocal(Session.java:442) at org.h2.engine.Session.prepareCommand(Session.java:384) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1188) at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:75) at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:42) at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.initializeSequences(DatabaseInformationImpl.java:64) at org.hibernate.tool.schema.extract.internal.DatabaseInformationImpl.<init>(DatabaseInformationImpl.java:60) at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:80) ... 13 more {noformat} Test opens connection to H2 so it should use H2Dialect {code:java} public static Properties getConnectionProviderProperties() { Properties props = new Properties(); props.put( Environment.DRIVER, "org.h2.Driver" ); props.put( Environment.URL, String.format( "jdbc:h2:mem:%s;DB_CLOSE_DELAY=-1", "db1" ) ); props.put( Environment.USER, "sa" ); props.put( Environment.PASS, "" ); return props; } {code}
    via by Martin Šimka,
  • Issue H2 Parser GROUP BY, 1.4.181 -> 1.4.184
    via by Nicolas Fortin (OrbisGIS),
    • org.h2.jdbc.JdbcSQLException: Tabelle "MSG_METADATA" nicht gefunden Table "MSG_METADATA" not found; SQL statement: select * from msg_metadata where MSG_ID = '<OPENAS2-14102016134310+0200-6544@ENERGY-MORE_NCGVHP>' [42102-175] at org.h2.message.DbException.getJdbcSQLException(DbException.java:332) at org.h2.message.DbException.get(DbException.java:172) at org.h2.message.DbException.get(DbException.java:149) at org.h2.command.Parser.readTableOrView(Parser.java:5071) at org.h2.command.Parser.readTableFilter(Parser.java:1188) at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1813) at org.h2.command.Parser.parseSelectSimple(Parser.java:1921) at org.h2.command.Parser.parseSelectSub(Parser.java:1807) at org.h2.command.Parser.parseSelectUnion(Parser.java:1631) at org.h2.command.Parser.parseSelect(Parser.java:1619) at org.h2.command.Parser.parsePrepared(Parser.java:426) at org.h2.command.Parser.parse(Parser.java:298) at org.h2.command.Parser.parse(Parser.java:270) at org.h2.command.Parser.prepareCommand(Parser.java:235) at org.h2.engine.Session.prepareLocal(Session.java:436) at org.h2.engine.Session.prepareCommand(Session.java:379) at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1138) at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:72) at org.openas2.processor.msgtracking.DbTrackingModule.persist(Unknown Source) at org.openas2.processor.msgtracking.BaseMsgTrackingModule.handle(Unknown Source) at org.openas2.processor.DefaultProcessor.handle(Unknown Source) at org.openas2.message.BaseMessage.trackMsgState(Unknown Source) at org.openas2.util.AS2Util.processMDN(Unknown Source) at org.openas2.processor.sender.AS2SenderModule.handle(Unknown Source) at org.openas2.processor.DefaultProcessor.handle(Unknown Source) at org.openas2.processor.resender.DirectoryResenderModule.processFile(Unknown Source) at org.openas2.processor.resender.DirectoryResenderModule.resend(Unknown Source) at org.openas2.processor.resender.BaseResenderModule$PollTask.run(Unknown Source) at java.util.TimerThread.mainLoop(Unknown Source) at java.util.TimerThread.run(Unknown Source)

    Users with the same issue

    jf-ast
    4 times, last one,
    Andreas Häber
    2 times, last one,
    musketyr
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    143 more bugmates