Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "PRODUCT" not found (this database is empty); SQL statement: insert into product (price, product_name, url, year, id) values (?, ?, ?, ?, ?) [42104-214]
CodePudding user response:
I think it's so clear print the error: Table "PRODUCT" not found
CodePudding user response:
You can set a flag to auto-generate the database for you in your persistence xml
<property name="jakarta.persistence.schema-generation.database.action" value="drop-and-create" />
or
<property name="hibernate.hbm2ddl.auto" value="drop-and-create" />