[FIRSTCUP-17] SEQUENCE Table was not deleted automatically while undeploying firstcup-war Created: 22/Aug/13 Updated: 22/Aug/13 Resolved: 22/Aug/13
|Affects Version/s:||7.0.1, 7.0.2|
|Resolution:||Works as designed||Votes:||0|
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
1 asadmin deploy firstcup-war.war
2 asadmin undeploy firstcup-war
3 asadmin deploy firstcup-war.war
PER01003: Deployment encountered SQL Exceptions:
The exception is not friendly and we should also delete SEQUENCE Table while undeploying firstcup-war.
|Comment by Ian Evans [ 22/Aug/13 ]|
This is actually the correct behavior, as SEQUENCE is a table that is used by the persistence provider for auto-generated primary keys. firstcup-war uses SEQUENCE, but other applications might also use SEQUENCE for their auto-generated primary keys.
The persistence provider (in this case EclipseLink) will create SEQUENCE if it doesn't exist when you first deploy firstcup-war, but will not delete it when firstcup-war is undeployed because other applications may have been subsequently deployed that depend on SEQUENCE for auto-generated primary keys.
The SQLException thrown on deployment isn't fatal, and subsequent deployments of firstcup-war will use auto-generated primary keys further down the sequence.