‘Deploy Business Data Model’ has encountered a problem.

Hi

I switched to Bonita 2021.2 recently but sometime bdm didn't deployed.

I do all these steps but they didn't fix the problem:

- redeploy bdm

- clean bdm

- restart Bonita

- restart windows

 

I have encountered this error before and had to reinstall Bonita!

Is there any solution to this error? 

I checked bdm and bom.xml, everything are apparently right.

\.metadata\.log:

!ENTRY org.bonitasoft.studio.businessobject 4 0 2022-05-22 10:37:38.880
!MESSAGE Failed to deploy BDM. Check Studio logs for more information.
!STACK 0
java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy82.login(Unknown Source)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:309)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:298)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.login(DeployBDMOperation.java:123)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:86)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMJob.run(DeployBDMJob.java:43)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.io.IOException: Error while executing POST request (http code: 404) <POST http://localhost:8080/bonita/serverAPI/org.bonitasoft.engine.api.LoginAPI/login HTTP/1.1>
    at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:144)
    at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79)
    at com.sun.proxy.$Proxy82.login(Unknown Source)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:309)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:298)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.login(DeployBDMOperation.java:123)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:86)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMJob.run(DeployBDMJob.java:43)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
    at     < ========== Beginning of the server stack trace ========== >. ( )
    at org.bonitasoft.engine.api.HTTPServerAPI.executeHttpPost(HTTPServerAPI.java:177)
    at org.bonitasoft.engine.api.HTTPServerAPI.invokeMethod(HTTPServerAPI.java:139)
    at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:79)
    ... 7 more
Caused by: org.apache.http.client.HttpResponseException: status code: 404
    at org.apache.http.impl.client.AbstractResponseHandler.handleResponse(AbstractResponseHandler.java:70)
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:66)
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:52)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140)
    at org.bonitasoft.engine.api.HTTPServerAPI.executeHttpPost(HTTPServerAPI.java:169)
    ... 9 more

 

I switched to anther project and its bdm deployed correctly but this project didn't!

Anyone have any idea?

I'm using Bonita community edition 2021.2.

 

 

Hello
For Bonita BDM deployment , there is a Alter table script that you need to run.
If you are adding any new columns or modifying existing columns, then you need to manually run alter script in database before running the BDM deployment. I have noticed Bonita has issues trying to perform alter table logic. Hence it needs to be addressed manually.
this is solved if you are doing a clean deploy. There all tables are dropped and recreated.

Hope this helps.

Hi

Thanks for your help but now doing a clean deploy doesn't fix the problem! after doing clean deploy I still get the error!

How do I run alter script manually? maybe the problem would be fixed using this way.

Hi

Thanks for your help but now doing a clean deploy doesn't fix the problem! after doing clean deploy I still get the error!

How do I run alter script manually? maybe the problem would be fixed using this way.

There are 2 ways.
either manually delete all the tables from database. Once u r sure all tables are deleted, redeploy the BDM

or 
follow this link.
https://www.w3schools.com/sql/sql_alter.asp


this  step will basically run before BDM deploy.
Similar alter table can be done if you have modifed any data type.

Thanks again.

As I mentioned the error occurs in local with Bonita Studio and h2 database. I'm familiar with sql syntax although I havn't problem in server version.

Anyway, I do delete all table in h2 database manually and redeploy bdm in Bonita again, but still the error is shown!

Do I have to switch to another database instead of h2 for local?

Thanks in advance

You can try this final Option

GO to BPM studio ->select Server from top -> Restart web server

or

go to file -> switch workspace -> give a new workspace name -> new workspace will be created -> try to redeploy the BDM here
P.S -> Take a backup of BDM by exporting the BDM zip file

I am wondering , could the issue be related to a name
for example, certain Keywords are reserved and should not be used. Maybe you used a column/attribute name and its a reserved Keyword. Check for all reserved keywords.
Maybe you have a query which is not compiled corrected. Check if you have any custom queries in BDM 
Maybe you are using special characters like  _  in attribute name. those are not allowed.


Can you upload and share the BDM zip file through google drive. Maybe I can try in my system to check if I can find the issue
 

Many thanks.

Restarting web server doesn't fix the error!

I always create column name with _ and it works in other projects! due to your note, I removed all _ but the error still happens!

I imported my project from previous version of Bonita, might it cause error?

 

Is it possible to look at the BDM ?? Could you share just the BDM.

You can host the link through google drive.