Hi Charles, No idea why GenerationType.AUTO is not working for you on OpenJPA 2.2.0. We have a large number of tests in our JUnit bucket that tests AUTO in a very similar manner as your posted Entity definition. And, these tests work just fine.
Although the message text doesn't indicate this, the AUTO mode does require the SEQUENCE table to exist. If you are running with SynchronizeMappings, then this table gets created for you automatically. Otherwise, you have to create it manually. The GenerationType.SEQUENCE that eventually worked for you doesn't require a separate table, so that might explain why that scenario works. Other than that, I'm not really sure. If you can isolate the scenario to simple junit then it might be easier to track the source of the issue. Thanks, Kevin On Wed, Oct 2, 2013 at 8:10 AM, Charles Moulliard <cmoulli...@gmail.com>wrote: > Being able to fix my problem with the following modification > > @Entity > @SequenceGenerator(name="incidentSeq", sequenceName="INCIDENT_SEQ") > @Table(name = "T_INCIDENT") > public class Incident extends Abstract implements Serializable { > > @Id > @GeneratedValue(strategy=GenerationType.SEQUENCE, > generator="incidentSeq") > //@GeneratedValue(strategy=GenerationType.AUTO) > @Column(name = "INCIDENT_ID") > private long incidentId; > > Question : Why @GeneratedValue(strategy=GenerationType.AUTO) generates the > error reported previously ? > > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Issue-with-OPENJPA-SEQUENCE-TABLE-tp7585016p7585018.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >