Glassfish-v2ur2 to Glassfish-2.1 PostgreSQL Migration issue
First off let me state I am not sure this is strictly a Glassfish issue.
I recently experienced a issue trying to migrate my application from Glassfish-v2ur2 to Glassfish-2.1.
At first it seemed as if my application ported over just fine by simply installing Glassfish-2.1 and deploying my application.
Just as I thought the sky was blue and rose pedals began to fall lighting struck with a JPA Exception in my log
The key was referencing a primary key conflict ACK!!!
I was able to find the answer to my issue somewhere on the back web, it turns out that from v2ur2 to 2.1 the support
for key generation on Postgres was changed from:
@GeneratedValue(strategy = GenerationType.SEQUENCE)
To:
@GeneratedValue(strategy = GenerationType.IDENTITY)
One would think that the GlassFish team might want to put something like the following on the download page to v2.1:
WE ARE GOING TO BREAK YOUR POSTGRESQL BASED APP UNLESS YOU CHANGE……
Hope this helps someone out in internet land.