Hi,
I try to install the newest version of Bonita. Previously i worked with version 7.8.0 and i have two separate database schema.
In /setup/database.properties, in field (bdm).database.name=DATABASE_NAME?currentSchema=SCHEMA_NAME
When i start server i get error:
Caused by: javax.naming.NamingException: Unexpected exception resolving reference [Root exception is java.lang.RuntimeException: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "DATABASE_NAME?currentSchema=SCHEMA_NAME" does not exist)]
at org.apache.naming.NamingContext.lookup(NamingContext.java:856)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.NamingContext.lookup(NamingContext.java:827)
at org.apache.naming.NamingContext.lookup(NamingContext.java:159)
at org.apache.naming.NamingContext.lookup(NamingContext.java:827)
at org.apache.naming.NamingContext.lookup(NamingContext.java:173)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:163)
at java.naming/javax.naming.InitialContext.lookup(InitialContext.java:409)
at org.springframework.jndi.JndiTemplate.lambda$lookup$0(JndiTemplate.java:157)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:92)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:157)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:179)
at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:96)
at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:114)
at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:239)
at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:225)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1853)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1790)
... 46 more
Caused by: java.lang.RuntimeException: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "DATABASE_NAME?currentSchema=SCHEMA_NAME" does not exist)
at org.jboss.narayana.tomcat.jta.internal.PoolingDataSourceFactory.createPoolingDataSource(PoolingDataSourceFactory.java:153)
at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getObjectInstance(TransactionalDataSourceFactory.java:72)
at org.apache.naming.factory.FactoryBase.getObjectInstance(FactoryBase.java:96)
at java.naming/javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:330)
at org.apache.naming.NamingContext.lookup(NamingContext.java:839)
... 63 more
Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "DATABASE_NAME?currentSchema=SCHEMA_NAME" does not exist)
at org.apache.tomcat.dbcp.dbcp2.managed.BasicManagedDataSource.createPoolableConnectionFactory(BasicManagedDataSource.java:252)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:533)
at org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getLogWriter(BasicDataSource.java:1047)
at org.jboss.narayana.tomcat.jta.internal.PoolingDataSourceFactory.createPoolingDataSource(PoolingDataSourceFactory.java:149)
... 67 more
The weirdest thing is that in bonita engine database, setup created table structure but exception was raised while try to start Bonita server.
This approach work fine with 7.8.0 and postgres 9 but don't work with 2021.1 and postgres 11.
Do you have any suggestion for this - how to define separate schema for Bonita ?