Bug 1309714

Summary: Support MariaDB in Dashbuilder
Product: [Retired] JBoss BPMS Platform 6 Reporter: Marek Winkler <mwinkler>
Component: BAMAssignee: David Gutierrez <dgutierr>
Status: CLOSED EOL QA Contact: Gui Jospin <gjospin>
Severity: high Docs Contact:
Priority: urgent    
Version: 6.3.0CC: kverlaen, lpetrovi, rrajasek
Target Milestone: ER2   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:04:35 UTC 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:
Bug Depends On:    
Bug Blocks: 1320021    
Attachments:
Description Flags
server log none

Description Marek Winkler 2016-02-18 14:36:11 UTC
Created attachment 1128250 [details]
server log

Description of problem:

Dashbuilder seems not to support MariaDB, for instance in [1].

According to server log, the database is detected as MySQL:

03:31:32,209 INFO  [org.jboss.dashboard.database.hibernate.HibernateInitializer] (ServerService Thread Pool -- 66) The underlying database is: mysql
03:31:33,441 INFO  [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 66) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect
03:31:33,593 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (ServerService Thread Pool -- 66) HHH000399: Using default transaction strategy (direct JDBC transactions)
03:31:33,596 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (ServerService Thread Pool -- 66) HHH000397: Using ASTQueryTranslatorFactory
03:31:34,533 WARN  [org.jboss.dashboard.database.DatabaseAutoSynchronizer] (ServerService Thread Pool -- 66) Running file 1-create-mysql.sql

Later a SQL problem is reported:

03:31:37,364 INFO  [org.jboss.dashboard.ui.resources.GraphicElement] (ServerService Thread Pool -- 66) Deploying files for org.jboss.dashboard.ui.resources.Envelope jbpmEnvelope
03:31:38,386 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 66) SQL Error: 1366, SQLState: 22007
03:31:38,386 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (ServerService Thread Pool -- 66) Incorrect string value: '\xE8\xAF\xAD\xE8\xA8\x80...' for column 'value' at row 1
...

(server log is attached)


[1] https://github.com/droolsjbpm/dashboard-builder/blob/6.4.x/modules/dashboard-commons/src/main/java/org/jboss/dashboard/database/hibernate/HibernateInitializer.java

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

Actual results:
SQL errors during deployment.

Expected results:
No SQL errors during deployment.

Comment 1 Marek Winkler 2016-02-18 14:44:09 UTC
I am wondering if the SQL error could be caused by misconfigured DB, I will double check. 

Nevertheless, please have a look at the HibernateInitializer [1] and decide if it needs to be updated (afaik, MariaDB is using the same Hibernate dialect as MySQL). For instance, method inferDatabaseName() might fail.

Comment 2 David Gutierrez 2016-03-16 13:10:47 UTC
I've tested the current distribution on Maria DB and it works fine. MariaDB is treated the same way as Mysql by dashbuilder as both DBs are 100% compatible.

So no changes are required in the dashboard-builder repo.

As for UF based dashbuilder, we did have to make some adjustments:

https://github.com/dashbuilder/dashbuilder/pull/159
https://github.com/dashbuilder/dashbuilder/pull/160

Comment 3 Jan Hrcek 2016-04-04 07:49:52 UTC
Ok, new dashbuilder tests passed with Maria DB 10. Verified with BPM Suite 6.2.0 ER2.