Bug 1030407 - SqlIntegrityConstraintViolationException when duplicating workspace on IBM DB2 9.7
SqlIntegrityConstraintViolationException when duplicating workspace on IBM DB...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
Unspecified Unspecified
medium Severity high
: ER6
: 6.0.0
Assigned To: Roger Martínez
Jan Hrcek
Depends On:
  Show dependency treegraph
Reported: 2013-11-14 06:31 EST by Jan Hrcek
Modified: 2014-08-06 16:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:10:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Server log with UNEXPECTED ERROR (102.19 KB, text/x-log)
2013-11-14 06:31 EST, Jan Hrcek
no flags Details

  None (edit)
Description Jan Hrcek 2013-11-14 06:31:10 EST
Created attachment 823893 [details]
Server log with UNEXPECTED ERROR

Description of problem:
When you try to duplicate workspace there is an unexpected error and the workspace is not duplicated.

Version-Release number of selected component (if applicable):
BPMS 6.0.0 ER4
IBM DB2 9.7 configured as datasource

How reproducible:

Steps to Reproduce:
1. Login with admin user and navigate to workspace Showcase
2. In administration bar click 'Duplicate workspace'

Actual results:
Unexpected error dialog appears. The exception is com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: DB2 SQL Error: SQLCODE=-407, SQLSTATE=23502, SQLERRMC=TBSPACEID=2, TABLEID=14, COLNO=3, DRIVER=4.14.122 

Expected results:
Workspace duplicatin should work.

Additional info:
There might be some error in the DDL file 1-create-db2.sql, as on all the other databases we are testing with the workspace duplication functionality works correctly.

See server log attached for full exception stack trace.
Comment 1 Roger Martínez 2013-11-18 11:45:14 EST
In DB2 the "unique" constraint for a table column seems to be handled different from other dbms. Unique constraint in DB2 implies the "not null" constraint too.

When duplicating a workspace in the dashbuilder webapp, the duplicated entity contains, as a initial value, null for the "url" field, which is mapped to a  database column that had a "unique" constraint. Then a constraint violation exception was threw.

As the "unquie" constraint for "url" field is implemented by Java coding too, I just have removed the unique constraint for the DB2 case.

Commits on master

Commits on 6.0.x
Comment 2 Jan Hrcek 2014-01-03 08:46:54 EST
Ok, verified with BPMS 6.0.0 ER7

Note You need to log in before you can comment on or make changes to this bug.