prafulis007
prafulis007

Reputation: 31

Im getting "com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505

My code :

@Id
    @Column(name = "cust_admin_id" )
    @SequenceGenerator(name = "Cust_Admin_seq" , sequenceName = "cust_Admin_id",allocationSize=1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE , generator = "Cust_Admin_seq")
    private Integer custAdminId;

Please help as this is in production...

Upvotes: 2

Views: 5197

Answers (1)

Peter Miehle
Peter Miehle

Reputation: 6080

you violate a constraint.

f.e. you insert the same dataset twice (same primary key, maybe different values) or you insert a dataset, that has no foreign key dataset connected to another table.

We need a bit more information

Upvotes: 2

Related Questions