BPROC error launching application

Hello,
I just installed Bproc (Premium) and since then I can no longer launch the application.
I have the following message and I understand the cause but don’t know how to solve it. This comes from a previous version (trial) that I had installed a long time ago.
It seems that the update of the tables does not work and that it would be necessary to modify the variable ( version mismatch: library version is ‘6.5.0.6’, db version is 5.20.0.2 Hint: Set <property name=“databaseSchemaUpdate” to value=“true” or value=“create-drop” (use create-drop for testing only!) in bean processEngineConfiguration in flowable.cfg.xml ) but I do not know how to do it.
Thank you for your help.

22:23:17.140 ERROR com.haulmont.cuba.web.AppUI             - Unable to init ui
com.haulmont.cuba.web.sys.remoting.LocalServiceAccessException: Unable to connect to middleware. Middleware block 'app-core' failed to start. See exception cause for details.
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.createServiceAccessException(LocalServiceProxy.java:193) ~[cuba-web-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:108) ~[cuba-web-7.2.18.jar:7.2.18]
	at com.sun.proxy.$Proxy31.healthCheck(Unknown Source) ~[na:na]
	at com.haulmont.cuba.web.AppUI.init(AppUI.java:342) ~[cuba-web-7.2.18.jar:7.2.18]
	at com.vaadin.ui.UI.doInit(UI.java:771) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.vaadin.server.communication.UIInitHandler.getBrowserDetailsUI(UIInitHandler.java:209) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.vaadin.server.communication.UIInitHandler.synchronizedHandleRequest(UIInitHandler.java:67) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.vaadin.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1636) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:465) [vaadin-server-8.14.3-1-cuba.jar:8.14.3-1-cuba]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329) [cuba-web-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215) [cuba-web-7.2.18.jar:7.2.18]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [servlet-api.jar:na]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat-websocket.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108) [spring-web-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74) [spring-web-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at com.haulmont.cuba.web.sys.CubaHttpFilter.doFilter(CubaHttpFilter.java:93) [cuba-web-7.2.18.jar:7.2.18]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:9.0.27]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:9.0.27]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:526) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [catalina.jar:9.0.27]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [catalina.jar:9.0.27]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678) [catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [catalina.jar:9.0.27]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [catalina.jar:9.0.27]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408) [tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:9.0.27]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:861) [tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1579) [tomcat-coyote.jar:9.0.27]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:9.0.27]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_312]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:9.0.27]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_312]
Caused by: org.flowable.common.engine.api.FlowableWrongDbException: version mismatch: library version is '6.5.0.6', db version is 5.20.0.2 Hint: Set <property name="databaseSchemaUpdate" to value="true" or value="create-drop" (use create-drop for testing only!) in bean processEngineConfiguration in flowable.cfg.xml for automatic schema creation
	at org.flowable.engine.impl.db.ProcessDbSchemaManager.schemaCheckVersion(ProcessDbSchemaManager.java:42) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:51) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:28) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:51) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:93) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.5.0.jar:6.5.0]
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72) ~[flowable-engine-common-6.5.0.jar:6.5.0]
	at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.5.0.jar:6.5.0]
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.5.0.jar:6.5.0]
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:35) ~[flowable-engine-common-6.5.0.jar:6.5.0]
	at com.haulmont.addon.bproc.engine.interceptor.BprocAuthenticationInterceptor.execute(BprocAuthenticationInterceptor.java:21) ~[na:na]
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:82) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:958) ~[flowable-engine-6.5.0.jar:6.5.0]
	at org.flowable.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:73) ~[flowable-spring-6.5.0.jar:6.5.0]
	at com.haulmont.addon.bproc.core.ProcessEngineInitializer.initProcessEngine(ProcessEngineInitializer.java:115) ~[na:na]
	at com.haulmont.addon.bproc.core.ProcessEngineInitializer.appStarted(ProcessEngineInitializer.java:95) ~[na:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_312]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_312]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_312]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_312]
	at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:305) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) ~[spring-context-5.2.16.RELEASE.jar:5.2.16.RELEASE]
	at com.haulmont.cuba.core.sys.EventsImpl.publish(EventsImpl.java:33) ~[cuba-global-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.core.sys.AppContext.startContext(AppContext.java:243) ~[cuba-global-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.core.sys.AppContext$Internals.startContext(AppContext.java:302) ~[cuba-global-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.core.sys.AbstractWebAppContextLoader.contextInitialized(AbstractWebAppContextLoader.java:94) ~[cuba-global-7.2.18.jar:7.2.18]
	at com.haulmont.cuba.core.sys.AppContextLoader.contextInitialized(AppContextLoader.java:52) ~[na:na]
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4685) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1133) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1867) ~[catalina.jar:9.0.27]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_312]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_312]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.27]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112) ~[na:1.8.0_312]
	at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1045) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:429) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) ~[catalina.jar:9.0.27]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_312]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) ~[tomcat-util.jar:9.0.27]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) ~[na:1.8.0_312]
	at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.27]
	at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) ~[catalina.jar:9.0.27]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.27]
	at org.apache.catalina.startup.Catalina.start(Catalina.java:633) ~[catalina.jar:9.0.27]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_312]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_312]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_312]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_312]
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344) ~[bootstrap.jar:9.0.27]
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475) ~[bootstrap.jar:9.0.27]

I have a purchase add-on (BPROC PREMIUM) and I can’t get it to work. An idea ? thank you !

Hi,

My guess is that you previously installed the BPM add-on that works with Activiti framework. BProc and BPM cannot work together.

What you can try to do is to exclude the BPM add-on from your application and to remove all Activiti tables (the ones that start with ACT_ prefix) from the database (if you don’t use them). After that include the BProc addon to your application.

thanks for these informations. It is indeed BPM which was installed but not used. I deleted it and also deleted all the tables (ACT). The problem now is that when I enable the BPROC add-on it doesn’t create any tables

16:50:51.013 ERROR o.f.c.e.i.interceptor.CommandContext    - Error while closing command context
org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERREUR: la relation « act_ge_property » n'existe pas
  Position : 20
### The error may exist in org/flowable/common/db/mapping/entity/Property.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select VALUE_ from ACT_GE_PROPERTY where NAME_ = 'schema.version'
### Cause: org.postgresql.util.PSQLException: ERREUR: la relation « act_ge_property » n'existe pas
  Position : 20

The easiest way will be just to recreate the database, because we’re talking about your development database, right?

If you want to fix it, then I can’t know which exact conflicts are in the database now, but you may try the following:

  • ensure that there are no tables with ACT_ prefix
  • ensure that there there are no tables with FLW_ prefix
  • ensure that there are no tables with BPROC_ prefix

If there are any, remove them.

Then check that bproc add-on database scripts have been applied, execute the following query:

select * from sys_db_changelog where script_name like '50-bproc/%';

It will probably return you the following records:

50-bproc/init/postgres/10.create-db.sql
50-bproc/init/postgres/20.create-db.sql
50-bproc/init/postgres/30.create-db.sql
50-bproc/init/postgres/flowable.postgres.all.create-db.sql
50-bproc/update/postgres/201203-1-createUserGroupRoleTable.sql
50-bproc/update/postgres/201203-2-migrateToUserGroupRoleTable.sql
50-bproc/update/postgres/201211-2-updateContentStorage.sql
50-bproc/update/postgres/201211-2-updateUserGroup.sql
50-bproc/update/postgres/201211-2-updateUserGroupRole.sql
50-bproc/update/postgres/flowable.postgres.upgradestep.6.4.2.to.6.5.0.all.sql

Then remove these records from the SYS_DB_CHANGELOG table:

delete from sys_db_changelog where script_name like '50-bproc/%';

The application will now think that BProc scripts haven’t been applied yet. They will be executed on next application start or database update.

Thanks Maxim,
this is the right procedure, it works!
I’ll just add this:
After applying your procedure. I restarted the application deployment with BPROC enabled.
Once the table creation scripts for Bproc have been executed and the creation of all the tables carried out, strangely the update of the sys_db_changeLog table was partial. This caused an error during subsequent updates of the application which still thought that the tables were not created. The scripts relaunched each time causing errors that I could circumvent from the studio by ignoring the database update but which was blocking for deployment in the production environment (Jelastic).
I looked in the sys-db-changelog table and found that the following lines had not been added.

        50-bproc/init/postgres/10.create-db.sql
        50-bproc/init/postgres/20.create-db.sql
        50-bproc/init/postgres/30.create-db.sql
        50-bproc/init/postgres/flowable.postgres.all.create-db.sql

So I imported those rows back into the table and now everything works fine.
Thanks again Maxim for showing me the way.