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: Always 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.
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 ================= https://github.com/droolsjbpm/dashboard-builder/commit/1d9a39edb01a55157f6b8e4a86c9b923ee8395ad Commits on 6.0.x ================= https://github.com/droolsjbpm/dashboard-builder/commit/1c9461a4ccd8f27fed60779621e7f3614e1acfc2
Ok, verified with BPMS 6.0.0 ER7