I am developing JavaFX Application using Spring boot, JPA, Hibernate & SQLite Database with the Gradle Build system in IntelliJ. Everything works well for the first time when there is no SQLite DB file. It will create that file and create all tables with proper definitions and I am able to do all DB operations using my app.
But when I run it for the second time It's not running and giving me an error which I am unable to solve it. Because this is the first time I am doing this.
the error is below.
Caused by: org.hibernate.exception.GenericJDBCException: Error accessing tables metadata at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
... 35 more
Caused by: org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (too many terms in compound SELECT) at org.sqlite.core.DB.newSQLException(DB.java:941) at org.sqlite.core.DB.newSQLException(DB.java:953) at org.sqlite.core.DB.throwex(DB.java:918) at org.sqlite.core.NativeDB.prepare_utf8(Native Method) at org.sqlite.core.NativeDB.prepare(NativeDB.java:134) at org.sqlite.core.DB.prepare(DB.java:257) ... 25 more
Now I have no Idea about
org.hibernate.exception.GenericJDBCException: Error accessing tables metadata
and
org.sqlite.SQLiteException: [SQLITE_ERROR] SQL error or missing database (too many terms in compound SELECT)
My application.properties file is like below
##Database Properties
spring.datasource.driver-class-name=org.sqlite.JDBC
spring.datasource.url=jdbc:sqlite:MYDATABASE.db
spring.datasource.username=root
spring.datasource.password=
#Hibernate Properties
#The SQL dialect makes hibernate generate better SQL for chosen database
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.SQLiteDialect
#Hibernate DDL auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=update
spring.main.web-environment=false
spring.main.web-application-type=none
##Uncomment below 2 lines to enable hibernate JDBC queries/logs
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
Is there anyone gone through this? please help.