6

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?

acdcjunior
  • 132,397
  • 37
  • 331
  • 304
Pinchy
  • 1,506
  • 8
  • 28
  • 49

1 Answers1

6

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).

Vineet Reynolds
  • 76,006
  • 17
  • 150
  • 174