It looks like this JIRA may help out in your situation... https://issues.apache.org/jira/i#browse/OPENJPA-2450
Basically, by using this property, you're telling OpenJPA to butt out and don't attempt to match up the sequence with the entity definition. Good luck, Kevin On Thu, Jan 30, 2014 at 9:03 AM, Kevin Sutter <kwsut...@gmail.com> wrote: > Hi, > It looks like you are experiencing the issue documented in > https://issues.apache.org/jira/browse/OPENJPA-2196. But, according to > the commits on that JIRA and the level of OpenJPA you are running with > (2.2.2), you should already have that fix... And, according to your > comment above, you are receiving the warning message mentioned in the > JIRA... It sounds like your scenario is causing a slightly different path > to be followed and OpenJPA doesn't properly "recover" from this failing > Alter Sequence command... > > I would suggest opening a child or related JIRA to 2196, referencing this > discussion as background. > > Kevin > > > On Wed, Jan 29, 2014 at 11:54 AM, Anja <anja.limb...@it.nrw.de> wrote: > >> From what I understand I don't see a connection with OPENJPA-2069. >> >> The application works fine if the db user is the sequence owner. >> >> The exception only arises if the db user is not allowed to alter the >> sequence and thus the ALTER SEQUENCE statement fails. >> I had looked at this issue which might be related: >> https://issues.apache.org/jira/browse/OPENJPA-2196 >> <https://issues.apache.org/jira/browse/OPENJPA-2196> >> The ALTER SEQUENCE statement fails and I get the warning mentioned in that >> discussion: >> >> https://issues.apache.org/jira/browse/OPENJPA-2196?focusedCommentId=13409478&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13409478 >> < >> https://issues.apache.org/jira/browse/OPENJPA-2196?focusedCommentId=13409478&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13409478 >> > >> >> But still Postgres doesn't seem to accept any more statements within the >> same transaction after the ALTER SEQUENCE statement and an exception is >> thrown at the following db statement. >> >> If ALTER SEQUENCE is avoided, the application also works fine. >> >> >> >> >> -- >> View this message in context: >> http://openjpa.208410.n2.nabble.com/Using-PostgreSQL-sequences-with-db-user-restrictions-tp7585893p7585895.html >> Sent from the OpenJPA Users mailing list archive at Nabble.com. >> > >