You're right, this is a bug. "NAME" is in the default set of reserved words that can't be used as column names. It appears to be valid for H2 though and we should handle it appropriately. Can you file a JIRA issue, or would you like me to do that on your behalf?
You can escape the name column as a workaround : @javax.persistence.TableGenerator( name = "fred", table = "jpa_sequence", pkColumnName = "\"name\"", valueColumnName = "last_value", pkColumnValue = "fred", allocationSize = 500) -mike On Fri, Aug 26, 2011 at 1:36 PM, Laird Nelson <ljnel...@gmail.com> wrote: > On Fri, Aug 26, 2011 at 1:49 PM, Laird Nelson <ljnel...@gmail.com> wrote: > > > OpenJPA tries to read a column called "NAME0", which is not defined > > anywhere. > > > > Changing the name of the sequence table column from "NAME" to > "SEQUENCE_NAME" fixed the problem. Bug in OpenJPA, I think. Maybe in the > H2 dictionary? > > Best, > Laird > -- > http://about.me/lairdnelson >