Bug 983534 - Dashbuilder creates shared tables on PostgreSQL datasource
Dashbuilder creates shared tables on PostgreSQL datasource
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: BAM (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium
: ER2
: 6.0.0
Assigned To: David Gutierrez
Jan Hrcek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-11 07:47 EDT by Jan Hrcek
Modified: 2014-08-06 16:11 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Jan Hrcek 2013-07-11 07:47:53 EDT
Description of problem:

When dashbuilder and business-central are deployed together, dashbuilder creates 2 tables shared by both applications, even though the table creation should have been left to business central (see comment 3 in this bug https://bugzilla.redhat.com/show_bug.cgi?id=973132#c3).

(1) There is an error in JBoss EAP application log when deploying dashbuilder together with business-central:

13:14:38,460 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 57) HHH000388: Unsuccessful: create table BAMTaskSummary (pk int8 not null, createdDate timestamp, duration int8, endDate timestamp, processInstanceId int8 not null, startDate timestamp, status varchar(255), taskId int8 not null, taskName varchar(255), userId varchar(255), primary key (pk))
13:14:38,461 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 57) ERROR: relation "bamtasksummary" already exists
13:14:43,042 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 57) HHH000388: Unsuccessful: create table ProcessInstanceLog (id int8 not null, duration int8, end_date timestamp, externalId varchar(255), user_identity varchar(255), outcome varchar(255), parentProcessInstanceId int8, processId varchar(255), processInstanceId int8 not null, processName varchar(255), processVersion varchar(255), start_date timestamp, status int4, primary key (id))
13:14:43,042 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 57) ERROR: relation "processinstancelog" already exists



(2) From dashbuilder application log we can see, that the tables were obviously created by dashbuilder:

[ServerService Thread Pool -- 60 11/07/13 13:14:20] WARN  org.jboss.dashboard.database.DatabaseAutoSynchronizer (DatabaseAutoSynchronizer.java:91) - Running file 1-create-postgres.sql []
[ServerService Thread Pool -- 60 11/07/13 13:14:28] WARN  org.jboss.dashboard.database.DatabaseAutoSynchronizer (DatabaseAutoSynchronizer.java:91) - Running file 2-jbpm-historylog-postgres.sql []

------------------

Version-Release number of selected component (if applicable):
BPMS 6.0.0.DR6
http://jawa05.englab.brq.redhat.com/candidate/BPMS-6.0.0-DR6/
-->  bpms-6.0.0.Beta-redhat-1-bpms-eap6.zip deployed on JBoss EAP 6.1

How reproducible:
Configure EAP 6.1 to use PostgreSQL datasource
+ specify <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />

Steps to Reproduce:
1. Configure EAP 6.1 to use PostgreSQL datasource
2. Configure business-central to use this datasource (Set org.hibernate.dialect.PostgreSQLDialect as hibernate.dialect in business-central.war   -> persistence.xml)
3. Configure dashbuilder to use this datasource (based on info from engineering, it is enough to put line with postgresql module in jboss-deployment structure - see https://github.com/droolsjbpm/dashboard-builder/blob/master/builder/src/main/jbossas7/README.md)
4. Start the EAP

Actual results:
The error (1) above apears in the application server startup log, because the 2 tables are created by dashboard builder, not by console.

Expected results:
No errors while deploying the 2 apps together.

Additional info:
Comment 1 Radovan Synek 2013-07-11 08:43:05 EDT
This issue applies to Oracle11gR2 database too - the same error in server log and dashbuilder uses its DDL for Oracle DB to create tables.
Comment 2 Radovan Synek 2013-07-11 09:04:59 EDT
The same applies to MS SQL2008
Comment 3 David Gutierrez 2013-07-12 06:46:47 EDT
I'm really wondering what dashbuilder version are you testing on. 

I'm pretty sure you are using on older version as I'm seeing the following trace "Running file 2-jbpm-historylog-postgres.sql" on your logs and that file was removed from github a few days ago: https://github.com/droolsjbpm/dashboard-builder/commit/8c102d57d73b47e70b1cffdde3f7dfbe1d2d470f which fixes the following BZ https://bugzilla.redhat.com/show_bug.cgi?id=973132 

Please, ensure you are testing the latest jbpm-dashboard application.
Comment 4 Jan Hrcek 2013-07-13 01:36:42 EDT
Hello David,
We are using the following deployments built by productization team:
http://jawa05.englab.brq.redhat.com/candidate/BPMS-6.0.0-DR6/
(file bpms-6.0.0.Beta-redhat-1-bpms-eap6.zip - I unzip this file into clean EAP 6.1 installation). I think It would be good if you review the contests of the deployments included in this zip distribution and discuss with the productization team if it's correct.

From what I checked so far there seems to be some mix of "generic" dashboard-builder & jbpm-dashboard projects:
1) this build contains most of the bug fixes not available in the previous version

2) the new dashbuilder branding is applied

3) On the other hand it is also possible to login to "standalone" dashbuilder (using http://localhost:8080/dashbuilder/ as opposed to jbpm-dashboard integrated in panel in jBPM-console) where I can see both "showcase" and "jBPM Dashboard" workspaces - which should not be possible if what you wrote here (https://bugzilla.redhat.com/show_bug.cgi?id=973132#c3 - point 1) were true.
Comment 5 David Gutierrez 2013-07-13 07:42:00 EDT
First of all, let me clarify some points to avoid any misunderstandings:

1.- Currently, exist two repos under droolsjbpm:

A- dashboard-builder: Generic (not droolsjbpm dependent) dashboard, reporting and monitoring tool. It only contains a generic showcase dashboard for admin/demo purposes.

B- jbpm-dashboard: Customized/Extended version of dashbuilder which adds an specific dashboard for jBPM, integrated with the jBPM history log tables. As an extension it inherits the default showcase dashboard from the dashboard-builder. So you will always see two dashboards when installing this war: Showcase and jBPM dashboard.

2.- From the BPMS perspective WHAT WE HAVE TO PRODUCTIZE & TEST it's B, the jbpm-dashbuilder.war generated by the jbpm-dashboard repo which in fact, it's a superset or extension of the generic dashbuilder.war. Testing B you'are implicitly testing A. 

3.- The bpms-6.0.0.Beta-redhat-1-bpms-eap6.zip doesn't contain the last fixes as it was built on 10-Jul-2013. It's definitely an older version.  You should ask the product team for an updated version.
Comment 7 Jan Hrcek 2013-09-07 00:10:06 EDT
Verified with BPMS 6.0.0.ER2

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