# i changed the database from h2 to postgresql, portal is not working ?

**URL:** <https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196>\
**Category:** Q&A\
**Created:** [29 May 2020 08:19 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196 "2020-05-29T08:19:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![prathyusha0525\_13847](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@prathyusha0525\_13847](https://community.ofelia.com/u/prathyusha0525_13847)\
**Post date:** [29 May 2020 08:19 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/1 "2020-05-29T08:19:46Z")

</div>

2020-05-29 13:22:23.329 +0530 FINE (main) org.jboss.narayana.tomcat.jta.TransactionLifecycleListener Initializing Narayana  
2020-05-29 13:22:23.712 +0530 INFO (main) com.arjuna.ats.arjuna ARJUNA012170: TransactionStatusManager started on port 57339 and host 127.0.0.1 with service com.arjuna.ats.arjuna.recovery.ActionStatusService  
2020-05-29 13:22:25.885 +0530 INFO (localhost-startStop-1) org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita] No Spring WebApplicationInitializer types detected on classpath  
2020-05-29 13:22:26.073 +0530 INFO (localhost-startStop-1) org.bonitasoft.platform.setup.ScriptExecutor configuration for Database vendor: postgres  
2020-05-29 13:22:26.077 +0530 INFO (localhost-startStop-1) org.bonitasoft.platform.setup.PlatformSetup System property org.bonitasoft.platform.setup.folder is set to C:\BonitaStudioCommunity-7.10.4\workspace\tomcat\server\..\setup  
2020-05-29 13:22:26.084 +0530 INFO (localhost-startStop-1) org.bonitasoft.platform.setup.PlatformSetup Connected to 'postgres' database with url: 'jdbc:postgresql://localhost:5432/bonita\_eng' with user: 'postgres'  
2020-05-29 13:22:26.204 +0530 INFO (localhost-startStop-1) org.bonitasoft.platform.setup.PlatformSetup Platform is already created.  
2020-05-29 13:22:26.208 +0530 INFO (localhost-startStop-1) org.bonitasoft.platform.setup.PlatformSetup Upgrading default configuration with files from folder: C:\BonitaStudioCommunity-7.10.4\workspace\tomcat\server\..\setup\platform\_conf\initial  
2020-05-29 13:22:26.251 +0530 INFO (localhost-startStop-1) org.bonitasoft.engine.EngineInitializer Initializing Bonita Engine...  
2020-05-29 13:22:35.837 +0530 INFO (localhost-startStop-1) org.bonitasoft.engine.configuration.monitoring.MeterRegistryFactory Publishing monitoring metrics to : io.micrometer.jmx.JmxMeterRegistry  
2020-05-29 13:22:39.843 +0530 WARNING (localhost-startStop-1) org.bonitasoft.engine.platform.impl.PlatformServiceImpl THREAD\_ID=21 | HOSTNAME=LAPTOP-H5MBPPO2 | Can't cache the platform, maybe the platform cache service is not started yet: The cache is not started, call start() on the cache service  
2020-05-29 13:22:39.867 +0530 WARN (localhost-startStop-1) org.hibernate.engine.jdbc.spi.SqlExceptionHelper SQL Error: 0, SQLState: 42883  
2020-05-29 13:22:39.867 +0530 ERROR (localhost-startStop-1) org.hibernate.engine.jdbc.spi.SqlExceptionHelper ERROR: operator does not exist: integer = boolean  
&nbsp; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.  
&nbsp; Position: 374  
2020-05-29 13:22:39.872 +0530 SEVERE (localhost-startStop-1) org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bonita] Exception sending context initialized event to listener instance of class [org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener]  
java.lang.RuntimeException: Error while initializing the Engine  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:34)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:614)  
&nbsp;&nbsp; &nbsp;at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1823)  
&nbsp;&nbsp; &nbsp;at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)  
&nbsp;&nbsp; &nbsp;at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
&nbsp;&nbsp; &nbsp;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
&nbsp;&nbsp; &nbsp;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
&nbsp;&nbsp; &nbsp;at java.lang.Thread.run(Thread.java:748)  
Caused by: org.bonitasoft.engine.platform.PlatformNotFoundException: Cannot determine if the default tenant is created  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.api.impl.PlatformAPIImpl.isPlatformInitialized(PlatformAPIImpl.java:361)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.EngineInitializer.initializeEngine(EngineInitializer.java:67)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.api.internal.servlet.EngineInitializerListener.contextInitialized(EngineInitializerListener.java:32)  
&nbsp;&nbsp; &nbsp;... 13 more  
Caused by: org.bonitasoft.engine.persistence.SBonitaReadException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:414)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:330)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.platform.impl.PlatformServiceImpl.isDefaultTenantCreated(PlatformServiceImpl.java:396)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.api.impl.PlatformAPIImpl.isPlatformInitialized(PlatformAPIImpl.java:359)  
&nbsp;&nbsp; &nbsp;... 15 more  
Caused by: org.hibernate.exception.SQLGrammarException: could not extract ResultSet  
&nbsp;&nbsp; &nbsp;at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)  
&nbsp;&nbsp; &nbsp;at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)  
&nbsp;&nbsp; &nbsp;at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)  
&nbsp;&nbsp; &nbsp;at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)  
&nbsp;&nbsp; &nbsp;at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:91)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.getResultSet(Loader.java:2066)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.doQuery(Loader.java:910)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.doList(Loader.java:2554)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.doList(Loader.java:2540)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2370)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.Loader.list(Loader.java:2365)  
&nbsp;&nbsp; &nbsp;at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:497)  
&nbsp;&nbsp; &nbsp;at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)  
&nbsp;&nbsp; &nbsp;at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:236)  
&nbsp;&nbsp; &nbsp;at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1300)  
&nbsp;&nbsp; &nbsp;at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)  
&nbsp;&nbsp; &nbsp;at org.hibernate.internal.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:966)  
&nbsp;&nbsp; &nbsp;at org.bonitasoft.engine.persistence.AbstractHibernatePersistenceService.selectOne(AbstractHibernatePersistenceService.java:410)  
&nbsp;&nbsp; &nbsp;... 19 more  
**Caused by: org.postgresql.util.PSQLException: ERROR: operator does not exist: integer = boolean  
&nbsp; Hint: No operator matches the given name and argument types. You might need to add explicit type casts.  
&nbsp; Position: 374**  
&nbsp;

---

<div class="post-metadata">

**Author:** ![romain.bioteau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/romain.bioteau/32/720_2.png) [@romain.bioteau](https://community.ofelia.com/u/romain.bioteau)\
**Post date:** [29 May 2020 08:53 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/2 "2020-05-29T08:53:18Z")

</div>

Did you follow the [documentation](https://documentation.bonitasoft.com/bonita/7.10/ubuntu-openjdk-tomcat-postgresql)?

Are you setuping a production environment or trying to update the Studio embedded runtime ?

---

<div class="post-metadata">

**Author:** ![prathyusha0525\_13847](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@prathyusha0525\_13847](https://community.ofelia.com/u/prathyusha0525_13847)\
**Post date:** [29 May 2020 09:46 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/3 "2020-05-29T09:46:52Z")

</div>

hi&nbsp;romain.bioteau, i followed the bonita documentation and connected to the postgres&nbsp;database but portal is not working. i am getting below exception&nbsp;

**Caused by: org.bonitasoft.engine.platform.PlatformNotFoundException: Cannot determine if the default tenant is created**  
&nbsp;

---

<div class="post-metadata">

**Author:** ![romain.bioteau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/romain.bioteau/32/720_2.png) [@romain.bioteau](https://community.ofelia.com/u/romain.bioteau)\
**Post date:** [30 May 2020 08:27 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/4 "2020-05-30T08:27:03Z")

</div>

Did you use ` `start-bonita.sh` ` or ` `start-bonita.bat`` to start your platform ?

Are you using a Studio environment or a standalone tomcat ?

---

<div class="post-metadata">

**Author:** ![prathyusha0525\_13847](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@prathyusha0525\_13847](https://community.ofelia.com/u/prathyusha0525_13847)\
**Post date:** [1 June 2020 04:46 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/5 "2020-06-01T04:46:34Z")

</div>

Hi&nbsp;_romain.bioteau,_

i am using studio environment and also used **start-bonita.bat** to start platform

---

<div class="post-metadata">

**Author:** ![romain.bioteau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/romain.bioteau/32/720_2.png) [@romain.bioteau](https://community.ofelia.com/u/romain.bioteau)\
**Post date:** [1 June 2020 11:13 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/6 "2020-06-01T11:13:19Z")

</div>

It is not supported to change the database in the dev (studio) environment. Please use a [standalone tomcat bundle](https://www.bonitasoft.com/downloads) and follow the documentation to setup Postgres.

---

<div class="post-metadata">

**Author:** ![prathyusha0525\_13847](https://avatars.discourse-cdn.com/v4/letter/p/6de8d8/32.png) [@prathyusha0525\_13847](https://community.ofelia.com/u/prathyusha0525_13847)\
**Post date:** [2 June 2020 06:06 UTC](https://community.ofelia.com/t/i-changed-the-database-from-h2-to-postgresql-portal-is-not-working/10196/7 "2020-06-02T06:06:35Z")

</div>

Ok thank you, i will try using tomcat bundle
