# Bonitasoft 7.0.1 - Tomcat bundle - Switching to MySql

**URL:** https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265
**Category:** Q&A
**Created:** [6 August 2015 18:47 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265 "2015-08-06T18:47:03Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kishoreup](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@kishoreup](https://community.ofelia.com/u/kishoreup)
#### Post date: [6 August 2015 18:47 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/1 "2015-08-06T18:47:03Z")

</div>

Hi,  
I am trying to switch the database from H2 to MySql and i am getting when i start my tomcat server.  
I followed the steps from documentation.  
I am getting below error. Please help.

2015-08-06 14:43:21.781 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initializeEngine  
INFO: Initializing Bonita Engine…  
2015-08-06 14:43:21.782 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initializeEngine  
INFO: Initializing Spring context…  
2015-08-06 14:43:34.414 -0400 org.hibernate.type.TypeFactory org.hibernate.type.TypeFactory$TypeScopeImpl injectSessionFactory  
WARN: HHH000233: Scoping types to session factory org.hibernate.internal.SessionFactoryImpl@329913c7 after already scoped org.hibernate.internal.SessionFactoryImpl@35f2b7ea  
2015-08-06 14:43:39.259 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initializeEngine  
INFO: Initializing platform…  
2015-08-06 14:43:39.260 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initPlatform  
INFO: Creating platform…  
2015-08-06 14:43:40.491 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initializeEngine  
INFO: Platform initialized successfully.  
2015-08-06 14:43:40.491 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer startPlatform  
INFO: Starting platform…  
2015-08-06 14:43:40.742 -0400 org.bonitasoft.engine.EngineInitializer org.bonitasoft.engine.EngineInitializer initializeEngine  
INFO: Exception while initializing the engine: org.bonitasoft.engine.platform.StartNodeException: Platform starting failed.  
2015-08-06 14:43:40.742 -0400 org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener contextInitialized  
SEVERE: Error while initializing the Engine  
org.bonitasoft.engine.platform.StartNodeException: Platform starting failed.  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.startNode(PlatformAPIImpl.java:248)  
at org.bonitasoft.engine.PlatformTenantManager.updatePlatform(PlatformTenantManager.java:53)  
at org.bonitasoft.engine.PlatformTenantManager.startPlatform(PlatformTenantManager.java:60)  
at org.bonitasoft.engine.EngineInitializer.startPlatform(EngineInitializer.java:147)  
at org.bonitasoft.engine.EngineInitializer.initializeEngine(EngineInitializer.java:101)  
at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:42)  
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)  
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)  
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:649)  
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)  
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1862)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
Caused by: org.bonitasoft.engine.exception.BonitaRuntimeException: java.io.IOException: Folder denoted by path C:\BonitaBPM7\bonita\engine-server\work\tenants\1 does not exist.  
at org.bonitasoft.engine.service.impl.SpringFileSystemBeanAccessor.getContext(SpringFileSystemBeanAccessor.java:80)  
at org.bonitasoft.engine.service.impl.SpringFileSystemBeanAccessor.getService(SpringFileSystemBeanAccessor.java:39)  
at org.bonitasoft.engine.service.impl.SpringTenantServiceAccessor.getSessionService(SpringTenantServiceAccessor.java:297)  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.beforeServicesStartOfRestartHandlersOfTenant(PlatformAPIImpl.java:371)  
at org.bonitasoft.engine.api.impl.PlatformAPIImpl.startNode(PlatformAPIImpl.java:230)  
… 18 more  
Caused by: java.io.IOException: Folder denoted by path C:\BonitaBPM7\bonita\engine-server\work\tenants\1 does not exist.  
at org.bonitasoft.engine.home.Folder.checkFolderExists(Folder.java:52)  
at org.bonitasoft.engine.home.Folder.listFiles(Folder.java:83)  
at org.bonitasoft.engine.home.BonitaHomeServer.getXmlResourcesOfFolder(BonitaHomeServer.java:165)  
at org.bonitasoft.engine.home.BonitaHomeServer.getConfigurationFiles(BonitaHomeServer.java:175)  
at org.bonitasoft.engine.home.BonitaHomeServer.getTenantConfigurationFiles(BonitaHomeServer.java:203)  
at org.bonitasoft.engine.service.impl.SpringTenantFileSystemBeanAccessor.getResources(SpringTenantFileSystemBeanAccessor.java:42)  
at org.bonitasoft.engine.service.impl.SpringFileSystemBeanAccessor.getContext(SpringFileSystemBeanAccessor.java:70)  
… 22 more

2015-08-06 14:43:40.960 -0400 org.bonitasoft.console.common.server.servlet.PlatformTenantListener org.bonitasoft.console.common.server.servlet.PlatformTenantListener contextInitialized  
SEVERE: Error while initializing the default tenant  
org.bonitasoft.engine.platform.NodeNotStartedException: The current node has not been started yet. Method PlatformAPI.startNode() must be called previously.  
at org.bonitasoft.engine.api.impl.ServerAPIImpl.checkMethodAccessibility(ServerAPIImpl.java:290)  
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIOutsideTransaction(ServerAPIImpl.java:283)  
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:276)  
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:131)  
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88)  
at com.sun.proxy.$Proxy7.login(Unknown Source)  
at org.bonitasoft.console.common.server.servlet.PlatformTenantListener.initializeDefaultTenant(PlatformTenantListener.java:61)  
at org.bonitasoft.console.common.server.servlet.PlatformTenantListener.contextInitialized(PlatformTenantListener.java:44)  
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4992)  
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)  
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:649)  
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:672)  
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1862)  
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)

---

<div class="post-metadata">

### Author: ![Laurent\_Leseigneur](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/laurent_leseigneur/32/725_2.png) [@Laurent\_Leseigneur](https://community.ofelia.com/u/Laurent_Leseigneur)
#### Post date: [6 August 2015 19:00 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/2 "2015-08-06T19:00:22Z")

</div>

Hi,

this trace seems to says that you started a Tomcat bundle with H2, that initialized an H2 database and fill initial bonita-home folder, then stop it, changed configuration to MySql, then restarted Tomcat.

Is it more or less what you did ?

If so, your database and your bonita-home folder are out-of-sync. “Switching” between database vendors will not work. If you want to start a fresh Tomcat bundle configured with MySql, do required change in database settings prior to first start of the Tomcat

L.

---

<div class="post-metadata">

### Author: ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)
#### Post date: [7 August 2015 17:19 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/3 "2015-08-07T17:19:36Z")

</div>

Fixed as above

---

<div class="post-metadata">

### Author: ![ramalingaiah.d](https://avatars.discourse-cdn.com/v4/letter/r/eb9ed0/32.png) [@ramalingaiah.d](https://community.ofelia.com/u/ramalingaiah.d)
#### Post date: [3 January 2017 10:21 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/4 "2017-01-03T10:21:39Z")

</div>

Hi,  
i am new bonitasoft ,  
i need only eclipse with bonitasoft project

Regards  
Ram

---

<div class="post-metadata">

### Author: ![kishoreup](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@kishoreup](https://community.ofelia.com/u/kishoreup)
#### Post date: [6 August 2015 19:20 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/5 "2015-08-06T19:20:35Z")

</div>

Thank you Laurent for your reply, but i did made the changes before i start the tomcat server.  
You are recommending that i need to start the tomcat with H2 first and then stop it and change that to MySql?

Thanks,  
Phani

---

<div class="post-metadata">

### Author: ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)
#### Post date: [7 August 2015 06:20 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/6 "2015-08-07T06:20:43Z")

</div>

No, no, no. Laurent is correct.

It looks like you might have done it right but something is wrong.

To do this correctly you must:

Download  
Extract - DO NOT start the services

follow these instructions: [http://documentation.bonitasoft.com/database-configuration-2](http://documentation.bonitasoft.com/database-configuration-2)  
**Note** this issue with MySQL: [http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html](http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html)  
**Note** : \*MySQL does not support surrogate characters. If you want to use surrogate characters in your processes, you need to use another type of database. \*

You should also have a look at: [http://documentation.bonitasoft.com/database-configuration-business-data-1](http://documentation.bonitasoft.com/database-configuration-business-data-1)

Actually - @Laurent - (Bonita should) have a look at these instructions, maybe the part 1) another database and 2) BDM database should be combined now that BDM is in all versions…

regards

---

<div class="post-metadata">

### Author: ![kishoreup](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@kishoreup](https://community.ofelia.com/u/kishoreup)
#### Post date: [7 August 2015 15:24 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/7 "2015-08-07T15:24:14Z")

</div>

Hi Sean,  
Thank you for your reply and removed existing installation and redid it from scratch and it worked. 🙂  
Thank you,  
Phani

---

<div class="post-metadata">

### Author: ![salma.bourebaa](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@salma.bourebaa](https://community.ofelia.com/u/salma.bourebaa)
#### Post date: [18 April 2016 11:30 UTC](https://community.ofelia.com/t/bonitasoft-7-0-1-tomcat-bundle-switching-to-mysql/6265/8 "2016-04-18T11:30:03Z")

</div>

Hi kishoreup, I’m sorry to disturb you… but I’m having the same problem while trying to configure Bonita to use Mysql database. I followed all the instructions in the Bonita documentation but still Tomcat try to initialize with an h2 database.

Did u get the same exception ?

Caused by: java.util.NoSuchElementException: Cannot find a Listener with classname org.bonitasoft.tomcat.H2Listener  
at org.bonitasoft.studio.engine.server.PortConfigurator.findListenerWithClassName(PortConfigurator.java:171)  
at org.bonitasoft.studio.engine.server.PortConfigurator.h2TCPPort(PortConfigurator.java:157)
