Bug 1014162 - Wrong column type in mysql schema for dtgov.jbpm
Summary: Wrong column type in mysql schema for dtgov.jbpm
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: DT Governance, Installer
Version: 6.0.0 GA
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ER4
: ---
Assignee: Thomas Hauser
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-01 13:28 UTC by Stefan Bunciak
Modified: 2015-08-02 23:45 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1014166 0 unspecified CLOSED jBPM tables for BPM component are not created when DTGov is not present 2021-02-22 00:41:40 UTC

Internal Links: 1014166

Description Stefan Bunciak 2013-10-01 13:28:14 UTC
Description of problem:


15:13:58,904 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 test.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


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Install FSW 6.0.0.ER4 and configure Mysql as the default database in post installation steps
2. Start the server
3.

Actual results:


Expected results:


Additional info:

Comment 1 Stefan Bunciak 2013-10-01 13:29:04 UTC
15:14:02,408 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777:   Services which 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

15:14:02,435 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
15:14:02,436 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
15:14:02,436 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss Red Hat JBoss Fuse Service Works 6.0.0.ER4-redhat-1 (AS 7.2.0.Final-redhat-8) started (with errors) in 16319ms - Started 1196 of 1348 services (44 services failed or missing dependencies, 104 services are passive or on-demand)

Comment 2 Kurt T Stam 2013-10-01 13:41:58 UTC
And you made sure to use the correct MySQL Dialect right? What version of MySQL are you using?

Comment 3 Stefan Bunciak 2013-10-01 14:02:18 UTC
I suppose the dialect is OK:

15:13:58,202 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 56) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect

Version: '5.5.32-MariaDB'
MySQL Connector/J 5.1.18

Comment 4 Kurt T Stam 2013-10-01 14:06:00 UTC
Can you try the Mysql5Dialect?

Comment 5 Stefan Bunciak 2013-10-02 10:13:38 UTC
I suppose that Dialect should be detected and set by the installer, so the schema generation should use it properly.

I've tried to start server with 

./standalone.sh -Dhibernate.dialect=org.hibernate.dialect.MySQL5Dialect 

and it really was using it:

12:10:24,552 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 56) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

but I suppose it's too late to set the dialect, it needs to be set correctly in the phase of generating DB schemas.

Comment 6 Stefan Bunciak 2013-10-02 10:27:48 UTC
I forgot to add that launching server with MySQL5Dialect didn't make any change, the error was still present.

Comment 7 kconner 2013-10-02 13:49:05 UTC
The DB scripts should be created using MySQL5Dialect, assigning to Steve to investigate.

Comment 8 Thomas Hauser 2013-10-02 14:01:27 UTC
The installer should be using the MySQL5Dialect when it executes the ant script. I can see the variable the installer uses (db.dialect) being set correctly once you select MySQL as the JDBC provider in the installer. Investigating further.

Comment 9 Steve Johnson 2013-10-02 16:43:31 UTC
There is a logged issue in hibernate bugtracker https://hibernate.atlassian.net/browse/HHH-6935

To fix use jdbc url with extra property (see example below)

jdbc:mysql://db01.mw.lab.eng.bos.redhat.com:3306/dballo04?transformedBitIsBoolean=true

Note, the addition of "?transformedBitIsBoolean=true"

Comment 10 Nick Cross 2013-10-03 09:32:20 UTC
Reassigning to Tom for installer change once QE confirms.

Comment 11 Stefan Bunciak 2013-10-03 11:21:17 UTC
After adding "?transformedBitIsBoolean=true" the error message no longer appears.

Comment 12 Thomas Hauser 2013-10-04 15:51:19 UTC
the "?transformedBitIsBoolean=true" has been appended onto the default URL for the database when the user selects a MySQL installation in the installer.

Comment 13 Len DiMaggio 2013-10-04 18:14:50 UTC
Verified for MySQL 5.5 in the Oct 4 respin #2 build.


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