An error occurred while deploying the Business Data Model in engine

hello All,
i have bonita 7.0, and i’m getting following error while deploy Business data model from bonita studio… Please help how to resolve this issue.

An error occurred while deploying the Business Data Model in engine
org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:143)
org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88)
com.sun.proxy.$Proxy30.installBusinessDataModel(Unknown Source)
org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.doDeployBDM(DeployBDMOperation.java:119)
org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:75)
org.bonitasoft.studio.businessobject.ui.wizard.ManageBusinessDataModelWizard$2.run(ManageBusinessDataModelWizard.java:152)
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
< ========== Beginning of the server stack trace ========== >. ( )
org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:282)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:467)
org.bonitasoft.engine.api.impl.ServerAPIImpl$2.call(ServerAPIImpl.java:436)
org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:312)
org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:443)
org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:278)
org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:131)
org.bonitasoft.engine.api.internal.servlet.HttpAPIServletCall.doPost(HttpAPIServletCall.java:112)
org.bonitasoft.engine.api.internal.servlet.HttpAPIServlet.doPost(HttpAPIServlet.java:35)
javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.bonitasoft.console.security.SessionFixationValve.invoke(SessionFixationValve.java:77)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.business.data.SBusinessDataRepositoryDeploymentException.: Upating schema fails due to: [com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table ‘sequences’ in information_schema, com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table ‘sequences’ in information_schema] ( )
org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.update(BusinessDataModelRepositoryImpl.java:171)
org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.createAndDeployServerBDMJar(BusinessDataModelRepositoryImpl.java:161)
org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.install(BusinessDataModelRepositoryImpl.java:150)
org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:278)
… 40 more. ( )

Hello.

This error occurs when you change the database to MySql, and you don’t remove all reference to initial H2.
Read carefully the official doc, and if you’re in Windows, edit the “/bin/setenv.bat” (property “set BDM_DB_OPTS” must be set to “mysql”) : this is not write in the doc.

Thanks for your feedback.
Please note setenv.bat already modified to use mysql instead of H2 and above issue still appear.

below is the entries inside setenv.bat:
@echo on

rem Set some JVM system properties required by Bonita BPM

rem Bonita home folder (configuration files, temporary folder…) location
set BONITA_HOME=“-Dbonita.home=%CATALINA_HOME%\bonita”

rem Define the RDMBS vendor use by Bonita Engine to store data
set DB_OPTS=“-Dsysprop.bonita.db.vendor=mysql”

rem Define the RDMBS vendor use by Bonita Engine to store Business Data
rem If you use different DB engines by tenants, please update directly bonita-tenant-community-custom.properties
set BDM_DB_OPTS=“-Dsysprop.bonita.bdm.db.vendor=mysql”

rem Bitronix (JTA service added to Tomcat and required by Bonita Engine for transaction management)
set BTM_OPTS=“-Dbtm.root=%CATALINA_HOME%” “-Dbitronix.tm.configuration=%CATALINA_HOME%\conf\bitronix-config.properties”

rem Optionnal JAAS configuration. Usually used when delgating authentication to LDAP / Active Directory server
rem set SECURITY_OPTS=“-Djava.security.auth.login.config=%CATALINA_HOME%\conf\jaas-standard.cfg”

rem Pass the JVM system properties to Tomcat JVM using CATALINA_OPTS variable
set CATALINA_OPTS=%CATALINA_OPTS% %BONITA_HOME% %DB_OPTS% %BDM_DB_OPTS% %BTM_OPTS% -Dfile.encoding=UTF-8 -Xshare:auto -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError

set CATALINA_PID=%CATALINA_BASE%\catalina.pid

also please find below entries for bitronix-resources.properties:
################################

BONITA BPM Standard Datasource

################################
resource.ds1.uniqueName=jdbc/bonitaDSXA
resource.ds1.minPoolSize=1
resource.ds1.maxPoolSize=50

For hibernate : see if we can set it to false

allowLocalTransactions=true

MySQL example

resource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
resource.ds1.driverProperties.user=bonita
resource.ds1.driverProperties.password=bonita
resource.ds1.driverProperties.URL=jdbc:mysql://127.0.0.1:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8
resource.ds1.testQuery=SELECT 1
###################################

BONITA ‘Business Data’ Datasource (may be different for each tenant)

###################################
resource.ds2.uniqueName=jdbc/BusinessDataDSXA
resource.ds2.minPoolSize=0
resource.ds2.maxPoolSize=5

MySQL example

resource.ds2.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
resource.ds2.driverProperties.user=bonita
resource.ds2.driverProperties.password=bonita
resource.ds2.driverProperties.URL=jdbc:mysql://127.0.0.1:3306/bonita?dontTrackOpenResources=true&useUnicode=true&characterEncoding=UTF-8
resource.ds2.testQuery=SELECT 1

below is the entries for bonita.xml

<?xml version='1.0' encoding='utf-8'?>
<!--  To not persist the session after reboot tomcat -->
<Manager pathname="" />

<!-- Configure Datasource for Bonita BPM standard database -->       
<Resource name="bonitaDS" auth="Container" type="javax.sql.DataSource"
    factory="bitronix.tm.resource.ResourceObjectFactory" uniqueName="jdbc/bonitaDSXA" />

<!-- MySQL Example -->

<Resource name="bonitaSequenceManagerDS"  
          auth="Container"  
          type="javax.sql.DataSource" 
          maxActive="17"  
          minIdle="5"  
          maxWait="10000"  
          initialSize="3" 
          maxPoolSize="15" 
          minPoolSize="3"
          maxConnectionAge="0"
          maxIdleTime="1800"
          maxIdleTimeExcessConnections="120"
          idleConnectionTestPeriod="30"
          acquireIncrement="3"
          validationQuery="SELECT 1"
          validationInterval="30000"
          testConnectionOnCheckout="true"
          removeAbandoned="true" 
          logAbandoned="true" 
          username="bonita" 
          password="bonita"
          driverClassName="com.mysql.jdbc.Driver" 
          url="jdbc:mysql://127.0.0.1:3306/bonita?dontTrackOpenResources=true&amp;useUnicode=true&amp;characterEncoding=UTF-8"/>

i also note that server.xml file being updated by the engine itself while running… i comment H2 listener but everytime the file updated by the engine itself.

Hey blablablabla (rs)

Thank you.It helped me!

Regards

hi, i try config mysql database But after validating the files as indicated, the error still appears, the version I use is 7.5.4

If you have issue with the database configuration I recommend to remove the h2 jar file from Tomcat (./setup/lib/h2-1.3.175.jar and ./server/lib/bonita/h2-1.3.175.jar). This will give an explicit error message in the log files.

Make sure you edit setup/database.properties to use MySQL.

Finally if you still have some issue with the configuration I recommend to open another thread as configuration is quite different between version 7.0 and 7.5 (no more bonita home folder). Also sharing the log files (using Google Drive, Dropbox…) can help to find out the cause of the issue.

hi
I still have problems publishing users, use nice soft 7.5.4 bundle

!ENTRY org.bonitasoft.studio.engine 1 0 2017-09-02 22:42:25.463
!MESSAGE Attempt to login as install

!ENTRY org.bonitasoft.studio.common 4 0 2017-09-02 22:42:25.467
!MESSAGE
!STACK 0
java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy40.login(Unknown Source)
at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:299)
at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:277)
at org.bonitasoft.studio.engine.BOSEngineManager.stop(BOSEngineManager.java:191)
at org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor$PreShutdownStudio.run(BonitaStudioWorkbenchAdvisor.java:107)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.apache.http.client.HttpResponseException: No Encontrado
at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:143)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
at com.sun.proxy.$Proxy40.login(Unknown Source)
at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:299)
at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:277)
at org.bonitasoft.studio.engine.BOSEngineManager.stop(BOSEngineManager.java:191)
at org.bonitasoft.studio.application.BonitaStudioWorkbenchAdvisor$PreShutdownStudio.run(BonitaStudioWorkbenchAdvisor.java:107)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
at < ========== Beginning of the server stack trace ========== >. ( )
at org.bonitasoft.engine.http.BonitaResponseHandler.handleResponse(BonitaResponseHandler.java:44)
at org.bonitasoft.engine.http.BonitaResponseHandler.handleResponse(BonitaResponseHandler.java:29)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at org.bonitasoft.engine.api.HTTPServerAPI.executeHttpPost(HTTPServerAPI.java:165)
at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:135)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:86)
… 6 more

Are you using Bonita Studio or Bonita Tomcat bundle or Bonita WildFly bundle?

From the log file it seems that you are using Bonita Studio. I recommend to shutdown any Tomcat or WildFly bundles that might running on the same computer as your Studio.

Also if you can share (using Google Drive, Dropbox…) the full content of the Studio and Engine log file that might help to figure out the issue.