Bug 1014162 - Wrong column type in mysql schema for dtgov.jbpm
Wrong column type in mysql schema for dtgov.jbpm
Status: CLOSED CURRENTRELEASE
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: DT Governance, Installer (Show other bugs)
6.0.0 GA
Unspecified Unspecified
unspecified Severity urgent
: ER4
: ---
Assigned To: Thomas Hauser
Jiri Sedlacek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-01 09:28 EDT by Stefan Bunciak
Modified: 2015-08-02 19:45 EDT (History)
8 users (show)

See Also:
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: ---


Attachments (Terms of Use)

  None (edit)
Description Stefan Bunciak 2013-10-01 09:28:14 EDT
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 09:29:04 EDT
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 09:41:58 EDT
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 10:02:18 EDT
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 10:06:00 EDT
Can you try the Mysql5Dialect?
Comment 5 Stefan Bunciak 2013-10-02 06:13:38 EDT
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 06:27:48 EDT
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 09:49:05 EDT
The DB scripts should be created using MySQL5Dialect, assigning to Steve to investigate.
Comment 8 Thomas Hauser 2013-10-02 10:01:27 EDT
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 12:43:31 EDT
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 05:32:20 EDT
Reassigning to Tom for installer change once QE confirms.
Comment 11 Stefan Bunciak 2013-10-03 07:21:17 EDT
After adding "?transformedBitIsBoolean=true" the error message no longer appears.
Comment 12 Thomas Hauser 2013-10-04 11:51:19 EDT
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 14:14:50 EDT
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.