Bug 1014166

Summary: jBPM tables for BPM component are not created when DTGov is not present
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Jiri Pechanec <jpechane>
Component: ConfigurationAssignee: Steve Johnson <stejohns>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Sedlacek <jsedlace>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.0.0 GACC: atangrin, jpechane, kconner, ldimaggi, ncross, oskutka, soa-p-jira
Target Milestone: ER4   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jiri Pechanec 2013-10-01 13:35:56 UTC
When an installer is required to install db tables it creates them for all components but jBPM.

Comment 1 Len DiMaggio 2013-10-01 16:46:47 UTC
Using MySQL 5.1 (included with RHEL6) - this error is reported by the installer:
Successfully added administrative user account.
Starting Application Server.
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/local/SOA_servers/SOA6/ER4/jboss-eap-6.1

  JAVA: /usr/lib/jvm/jre-1.7.0-openjdk.x86_64//bin/java

  JAVA_OPTS: -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

12:41:28,053 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.Final-redhat-1
Trying to connect to Management Interface...(1/5).
12:41:29,486 INFO  [org.jboss.as.process.Host Controller.status] (main) JBAS012017: Starting process 'Host Controller'
[Host Controller] 12:41:31,167 INFO  [org.jboss.modules] (main) JBoss Modules version 1.2.0.Final-redhat-1
[Host Controller] 12:41:31,650 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1
[Host Controller] 12:41:31,962 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: JBoss Red Hat JBoss Fuse Service Works 6.0.0.ER4-redhat-1 (AS 7.2.0.Final-redhat-8) starting
[Host Controller] 12:41:34,075 INFO  [org.xnio] (MSC service thread 1-1) XNIO Version 3.0.7.GA-redhat-1
[Host Controller] 12:41:34,087 INFO  [org.xnio.nio] (MSC service thread 1-1) XNIO NIO Implementation Version 3.0.7.GA-redhat-1
[Host Controller] 12:41:34,102 INFO  [org.jboss.remoting] (MSC service thread 1-1) JBoss Remoting version 3.2.16.GA-redhat-1
[Host Controller] 12:41:34,121 INFO  [org.jboss.as] (Controller Boot Thread) JBAS010902: Creating http management service using network interface (management) port (9990) securePort (-1)
[Host Controller] 12:41:34,472 INFO  [org.jboss.as.remoting] (MSC service thread 1-8) JBAS017100: Listening on 127.0.0.1:9999
Trying to connect to Management Interface...(2/5).
Connected to Management Interface.
Datasource script /opt/local/SOA_servers/SOA6/ER4/jboss-eap-6.1/cli-scripts/jbpmDS-ds-default.cli failed.
Running onfail Server Check.
Shutting server down.
Trying to connect to Management Interface...(1/5).
Connected to Management Interface.
12:41:40,229 INFO  [org.jboss.as.process] (Thread-8) JBAS012016: Shutting down process controller
12:41:40,230 INFO  [org.jboss.as.process.Host Controller.status] (Thread-8) JBAS012018: Stopping process 'Host Controller'
[Host Controller] 12:41:40,384 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015950: JBoss Red Hat JBoss Fuse Service Works 6.0.0.ER4-redhat-1 (AS 7.2.0.Final-redhat-8) stopped in 90ms
12:41:40,411 INFO  [org.jboss.as.process.Host Controller.status] (reaper for Host Controller) JBAS012010: Process 'Host Controller' finished with an exit status of 0
12:41:40,412 INFO  [org.jboss.as.process] (Thread-8) JBAS012015: All processes finished; exiting

Comment 2 Len DiMaggio 2013-10-01 16:52:42 UTC
The error message can be easy to overlook in the above log:

Datasource script /opt/local/SOA_servers/SOA6/ER4/jboss-eap-6.1/cli-scripts/jbpmDS-ds-default.cli failed.

Comment 3 Len DiMaggio 2013-10-01 19:28:28 UTC
Sorry - ignore:  https://bugzilla.redhat.com/show_bug.cgi?id=1014166#c1

This is a different issue.

Comment 4 Len DiMaggio 2013-10-01 20:29:12 UTC
It looks like these are the only tables created:

mysql> show tables;
+------------------------+
| Tables_in_fsw6         |
+------------------------+
| BPAF_EVENT             |
| BPAF_EVENT_DATA        |
| BPEL_ACTIVITY_RECOVERY |
| BPEL_CORRELATION_SET   |
| BPEL_CORRELATOR        |
| BPEL_CORSET_PROP       |
| BPEL_EVENT             |
| BPEL_FAULT             |
| BPEL_MESSAGE           |
| BPEL_MESSAGE_EXCHANGE  |
| BPEL_MESSAGE_ROUTE     |
| BPEL_MEX_PROP          |
| BPEL_PARTNER_LINK      |
| BPEL_PROCESS           |
| BPEL_PROCESS_INSTANCE  |
| BPEL_SCOPE             |
| BPEL_XML_DATA          |
| BPEL_XML_DATA_PROP     |
| ODE_JOB                |
| STORE_DU               |
| STORE_PROCESS          |
| STORE_PROCESS_PROP     |
| STORE_PROC_TO_PROP     |
| STORE_VERSIONS         |
+------------------------+
24 rows in set (0.00 sec)

Comment 5 Len DiMaggio 2013-10-01 20:43:46 UTC
Sorry - ignore the previous comment - that was a partial install due to this bug:

https://bugzilla.redhat.com/show_bug.cgi?id=1014363

(Thee installation failed if S-RAMP and DTGov were installed.)

Comment 6 Len DiMaggio 2013-10-02 00:43:00 UTC
Sorry for the confusion - this is the set of tables that is created:

show tables;
+--------------------------------+
| Tables_in_fsw6                 |
+--------------------------------+
| Attachment                     |
| BAMTaskSummary                 |
| BPAF_EVENT                     |
| BPAF_EVENT_DATA                |
| BPEL_ACTIVITY_RECOVERY         |
| BPEL_CORRELATION_SET           |
| BPEL_CORRELATOR                |
| BPEL_CORSET_PROP               |
| BPEL_EVENT                     |
| BPEL_FAULT                     |
| BPEL_MESSAGE                   |
| BPEL_MESSAGE_EXCHANGE          |
| BPEL_MESSAGE_ROUTE             |
| BPEL_MEX_PROP                  |
| BPEL_PARTNER_LINK              |
| BPEL_PROCESS                   |
| BPEL_PROCESS_INSTANCE          |
| BPEL_SCOPE                     |
| BPEL_XML_DATA                  |
| BPEL_XML_DATA_PROP             |
| BooleanExpression              |
| Content                        |
| ContextMappingInfo             |
| CorrelationKeyInfo             |
| CorrelationPropertyInfo        |
| Deadline                       |
| Delegation_delegates           |
| Escalation                     |
| EventTypes                     |
| GS_APP_DATA                    |
| GS_GADGET                      |
| GS_GROUP                       |
| GS_PAGE                        |
| GS_USER                        |
| GS_USER_GROUP                  |
| GS_WIDGET                      |
| GS_WIDGET_PREF                 |
| I18NText                       |
| NodeInstanceLog                |
| Notification                   |
| Notification_BAs               |
| Notification_Recipients        |
| Notification_email_header      |
| ODE_JOB                        |
| OrganizationalEntity           |
| PeopleAssignments_BAs          |
| PeopleAssignments_ExclOwners   |
| PeopleAssignments_PotOwners    |
| PeopleAssignments_Recipients   |
| PeopleAssignments_Stakeholders |
| ProcessInstanceInfo            |
| ProcessInstanceLog             |
| RTGOV_ACTIVITIES               |
| RTGOV_ACTIVITY_CONTEXT         |
| RTGOV_ACTIVITY_PROPERTIES      |
| RTGOV_ACTIVITY_UNITS           |
| RTGOV_SITUATIONS               |
| RTGOV_SITUATION_ACTIVITY_TYPES |
| RTGOV_SITUATION_CONTEXT        |
| RTGOV_SITUATION_PROPERTIES     |
| Reassignment                   |
| Reassignment_potentialOwners   |
| STORE_DU                       |
| STORE_PROCESS                  |
| STORE_PROCESS_PROP             |
| STORE_PROC_TO_PROP             |
| STORE_VERSIONS                 |
| SessionInfo                    |
| Task                           |
| TaskEvent                      |
| VariableInstanceLog            |
| WorkItemInfo                   |
| email_header                   |
| hibernate_sequence             |
| task_comment                   |
+--------------------------------+
75 rows in set (0.00 sec)

Comment 7 Len DiMaggio 2013-10-02 01:21:48 UTC
Seeing this in the log:

21:11:46,318 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 56) MSC000001: Failed to start service jboss.persistenceunit."dtgov.war#org.overlord.dtgov.jbpm": org.jboss.msc.service.StartException in service jboss.persistenceunit."dtgov.war#org.overlord.dtgov.jbpm": javax.persistence.PersistenceException: [PersistenceUnit: org.overlord.dtgov.jbpm] Unable to build EntityManagerFactory
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
	at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
	at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.overlord.dtgov.jbpm] Unable to build EntityManagerFactory
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:930)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904)
	at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:92)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57)
	at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99)
	... 4 more
Caused by: org.hibernate.HibernateException: Wrong column type in fsw6.Task for column skipable. Found: bit, expected: boolean
	at org.hibernate.mapping.Table.validateColumns(Table.java:373)
	at org.hibernate.cfg.Configuration.validateSchema(Configuration.java:1265)
	at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:155)
	at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:508)
	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1750)
	at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:94)
	at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:920)
	... 9 more

Comment 8 Jiri Pechanec 2013-10-02 04:58:16 UTC
It seems there are two issues now.

I have to apologize for the confusion. There are two parts of FSW that uses jBPM
1) DTGov
2) BPM component in SY

If DTGov is installed the tables are really created. If it is not installed (but we still have jBPM in BPM component) then the tables are not created.

IMHO the tables should be created if DTGov is installed or SY is installed.

Len's issue is completely different and should be created as a separate bz.

Comment 9 Jiri Pechanec 2013-10-02 05:17:27 UTC
Just a list of tables when DTGov is not installed
mysql> show tables;
+--------------------------------+
| Tables_in_soa                  |
+--------------------------------+
| BPAF_EVENT                     |
| BPAF_EVENT_DATA                |
| BPEL_ACTIVITY_RECOVERY         |
| BPEL_CORRELATION_SET           |
| BPEL_CORRELATOR                |
| BPEL_CORSET_PROP               |
| BPEL_EVENT                     |
| BPEL_FAULT                     |
| BPEL_MESSAGE                   |
| BPEL_MESSAGE_EXCHANGE          |
| BPEL_MESSAGE_ROUTE             |
| BPEL_MEX_PROP                  |
| BPEL_PARTNER_LINK              |
| BPEL_PROCESS                   |
| BPEL_PROCESS_INSTANCE          |
| BPEL_SCOPE                     |
| BPEL_XML_DATA                  |
| BPEL_XML_DATA_PROP             |
| GS_APP_DATA                    |
| GS_GADGET                      |
| GS_GROUP                       |
| GS_PAGE                        |
| GS_USER                        |
| GS_USER_GROUP                  |
| GS_WIDGET                      |
| GS_WIDGET_PREF                 |
| ODE_JOB                        |
| RTGOV_ACTIVITIES               |
| RTGOV_ACTIVITY_CONTEXT         |
| RTGOV_ACTIVITY_PROPERTIES      |
| RTGOV_ACTIVITY_UNITS           |
| RTGOV_SITUATIONS               |
| RTGOV_SITUATION_ACTIVITY_TYPES |
| RTGOV_SITUATION_CONTEXT        |
| RTGOV_SITUATION_PROPERTIES     |
| STORE_DU                       |
| STORE_PROCESS                  |
| STORE_PROCESS_PROP             |
| STORE_PROC_TO_PROP             |
| STORE_VERSIONS                 |
| hibernate_sequence             |
+--------------------------------+

Comment 10 Len DiMaggio 2013-10-02 13:53:36 UTC
Sorry for all the confusion - I changed the title of this bz to reflect the issue.

The secondary issue is already logged in:
   https://bugzilla.redhat.com/show_bug.cgi?id=1014162

Comment 14 Jiri Pechanec 2013-10-08 13:04:41 UTC
Verified in ER4 04-Oct-2013 04:44