# MySQL Error

**URL:** <https://community.ofelia.com/t/mysql-error/5074>\
**Category:** Q&A\
**Created:** [28 August 2014 19:33 UTC](https://community.ofelia.com/t/mysql-error/5074 "2014-08-28T19:33:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![enriquees](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@enriquees](https://community.ofelia.com/u/enriquees)\
**Post date:** [28 August 2014 19:33 UTC](https://community.ofelia.com/t/mysql-error/5074/1 "2014-08-28T19:33:17Z")

</div>

I’m trying to install Bonita 6.3.3 in Ubuntu + Tomcat + MySQL.  
I’m using the next tutorial: [http://documentation.bonitasoft.com/ubuntu-openjdk-tomcat-mysql](http://documentation.bonitasoft.com/ubuntu-openjdk-tomcat-mysql)

I finish all the step but i get ERROR 500: org.bonitasoft.console.common.server.utils.DefaultTenantIdException

And in the log i can see an MySQL error, Is an error when try to create a table:  
Anyone can help me?

INFO: Platform is already initialized.  
org.bonitasoft.engine.exception.CreationException: Platform Creation failed.  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.createPlatform(PlatformAPIImpl.java:169)  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.createAndInitializePlatform(PlatformAPIImpl.java:210)  
at org.bonitasoft.engine.PlatformTenantManager.createPlatform(PlatformTenantManager.java:43)  
at org.bonitasoft.engine.EngineInitializer.initPlatform(EngineInitializer.java:133)  
at org.bonitasoft.engine.EngineInitializer.initializeEngine(EngineInitializer.java:91)  
at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:43)  
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)  
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)  
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)  
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)  
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)  
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)  
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:670)  
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1839)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)  
at java.util.concurrent.FutureTask.run(FutureTask.java:262)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: org.bonitasoft.engine.platform.SPlatformCreationException: Unable to create platform tables : com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LONGVARCHAR,  
filename VARCHAR(255) NOT NULL,  
value\_ LONGVARBINARY NOT NULL,  
’ at line 4  
at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.createPlatformTables(PlatformServiceImpl.java:151)  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.createPlatform(PlatformAPIImpl.java:152)  
… 18 more

---

<div class="post-metadata">

**Author:** ![emmanuel.duchastenie](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/emmanuel.duchastenie/32/723_2.png) [@emmanuel.duchastenie](https://community.ofelia.com/u/emmanuel.duchastenie)\
**Post date:** [2 September 2014 08:39 UTC](https://community.ofelia.com/t/mysql-error/5074/2 "2014-09-02T08:39:54Z")

</div>

Hi,

This error means you try to execute H2 database SQL script (default database in a Tomcat Bundle) on your MySQL database.  
This means you might have forgotten to tell Bonita BPM Platform that the DB you use is MySQL. Make sure you specify the following parameter, as described in [http://documentation.bonitasoft.com/ubuntu-openjdk-tomcat-mysql](http://documentation.bonitasoft.com/ubuntu-openjdk-tomcat-mysql) :  
`
-Dsysprop.bonita.db.vendor=mysql
`

Hope this helps,  
Emmanuel

---

<div class="post-metadata">

**Author:** ![enriquees](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@enriquees](https://community.ofelia.com/u/enriquees)\
**Post date:** [11 September 2014 12:34 UTC](https://community.ofelia.com/t/mysql-error/5074/3 "2014-09-11T12:34:19Z")

</div>

This is the original configuration, the error haven’t changed.

MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LONGVARCHAR,  
filename VARCHAR(255) NOT NULL,  
value\_ LONGVARBINARY NOT NULL,

I’m lost…

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/community_bonitasoft/original/2X/6/6b7b18c0478f2645369e82e009b65e3b97f2cc12.svg) [@system](https://community.ofelia.com/u/system)\
**Post date:** [2 September 2014 08:17 UTC](https://community.ofelia.com/t/mysql-error/5074/4 "2014-09-02T08:17:59Z")

</div>

hello, with tomcat, I would recommand that you try PostgreSQL 😉

---

<div class="post-metadata">

**Author:** ![enriquees](https://avatars.discourse-cdn.com/v4/letter/e/e36b37/32.png) [@enriquees](https://community.ofelia.com/u/enriquees)\
**Post date:** [6 September 2014 16:30 UTC](https://community.ofelia.com/t/mysql-error/5074/5 "2014-09-06T16:30:26Z")

</div>

Emmanuel,  
Thank for your response!  
This configuration is ok, I think..:

BONITA\_HOME=“-Dbonita.home=/opt/bonita/bonita\_home-6.3.3”

# Bitronix (JTA for Tomcat) configuration

BTM\_OPTS=“-Dbtm.root=/opt/bonita/btm -Dbitronix.tm.configuration=/opt/bonita/bt$  
CATALINA\_OPTS=”${CATALINA\_OPTS} ${BONITA\_HOME} ${BTM\_OPTS} -Dfile.encoding=UTF-$  
export CATALINA\_OPTS  
DB\_OPTS=“-Dsysprop.bonita.db.vendor=mysql”

---

<div class="post-metadata">

**Author:** ![emmanuel.duchastenie](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/emmanuel.duchastenie/32/723_2.png) [@emmanuel.duchastenie](https://community.ofelia.com/u/emmanuel.duchastenie)\
**Post date:** [11 September 2014 08:40 UTC](https://community.ofelia.com/t/mysql-error/5074/6 "2014-09-11T08:40:52Z")

</div>

This configuration seems good to me.  
Doesn’t is work for you?  
If you change the DB configuration, make sure you start with a clean install of bonita and a clean Mysql database. Generally, if the first configuration was bad, the database / bonita\_home is left in an unstable state.

What is your new stacktrace / error?

---

<div class="post-metadata">

**Author:** ![emmanuel.duchastenie](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/emmanuel.duchastenie/32/723_2.png) [@emmanuel.duchastenie](https://community.ofelia.com/u/emmanuel.duchastenie)\
**Post date:** [11 September 2014 14:49 UTC](https://community.ofelia.com/t/mysql-error/5074/7 "2014-09-11T14:49:31Z")

</div>

I confirm the problem is that H2 sql scripts are trying to be executed on MySQL server. This is the cause of the problem.  
To fix this, be sure you have this property set:  
`
DB_OPTS=“-Dsysprop.bonita.db.vendor=mysql”
`  
in your **setEnv.sh** file.

Hope this helps.
