MySQL Error

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

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

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 :

-Dsysprop.bonita.db.vendor=mysql

Hope this helps,
Emmanuel

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…

hello, with tomcat, I would recommand that you try PostgreSQL :wink:

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”

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?

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.