openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Sutter <>
Date Wed, 02 Oct 2013 14:55:53 GMT
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.


On Wed, Oct 2, 2013 at 8:10 AM, Charles Moulliard <>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:
> Sent from the OpenJPA Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message