I have an entity class called User
and when I do persistence testing with Arquillian I have always have an error...
Internal Exception: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "USER" at line 1, column 13.
...because of the class name "User
". I assume User
is the reserved keyword. When I change my entity name to User_
it works fine.
Do I have to change my entity name? Is there anything else I can do to fix this issue?
Yes, USER
is a built-in function in Derby. You'd have to specify a different table name for the JPA entity (usually done via the @Table annotation).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With