Table not found with Hibernate and HSQLDB

We use the hibernate entitymanager to map our objects through JPA. And we use the database in the HSQLDB database for unit testing. Everything was fine until the last refactor to the model started to cause the following error:

17:55:48.516 [main] WARN  o.h.util.JDBCExceptionReporter - SQL Error: -22, SQLState: S0002
17:55:48.517 [main] ERROR o.h.util.JDBCExceptionReporter - Table not found in statement

I cannot post an SQL query, but can someone give me guidance on the possible causes of the above error? especially since I know that the code worked before. Does hibernate seem to generate invalid sqls due to refactoring?

+3
source share
4 answers

Well, is the table really? Enable SQL output for Hibernate and check it against the actual database schema.

, ( , ).

- , .

+2

JDBC Hibernate.

, JDBC- HSQLDB, Hibernate - org.hibernate.dialect.Oracle10gDialect.

: []: java.sql.SQLException: [select sequence_name from all_sequences]

+3

, -

@Column (name = "AVAIL_TARGET_PERCENT", columnDefinition = "number (5,2)", nullable = false)

columnDefinition ( !), . , .

+1

. , hibernate.dialect org.hibernate.dialect.Oracle10gDialect H2, . , hibernate.dialect - . Hibernate , . ,
https://docs.jboss.org/hibernate/orm/3.6/reference/en-US/html/portability.html

+1
source

Source: https://habr.com/ru/post/1717986/


All Articles