App run some time then throw table not found exception

45 views
Skip to first unread message

Ratil

unread,
Sep 8, 2021, 4:54:57 AM9/8/21
to H2 Database
Hi all, I have use SpringBoot, Mybatis and H2 for my app.
when the app first started, it is normal, it can use select sql search data.
but after a short time, I run the same sql, it had throw a exception that 
org.h2.jdbc.JdbcSQLException: Table “xxxxxx” not found; SQL statement.

this is my sql:
select * from table_name where ***

Here is configuration and h2 url 

spring:
  h2:
    console:
      enabled: true
      path: /h2
  jpa:
    database-platform: org.hibernate.dialect.H2Dialect
  datasource:
    driver-class-name: org.h2.Driver
    username: sa
    password: 
  url:jdbc:h2:file:${user.dir}/dbh2/test;mode=mysql;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=TRUE;AUTO_RECONNECT=TRUE
# init.sql, some cretae table sql
  schema: classpath:sql/init.sql

Shubham kapoor

unread,
Jun 23, 2022, 3:23:38 AMJun 23
to H2 Database
Hi, 

Were you able to identify the root cause and solve the issue as I am also facing the same issue.

Reply all
Reply to author
Forward
0 new messages