Error while executing POST request with postgres DB on docker

Hello,

I am trying to connect my bonita platform (desktop version) to a postgres DB mointed on docker.

My Bonita project was deploying and running smoothly when i was on an H2 DB. But when I modified the configuration to connect it to a postgres DB and deployed the my BDM, I got the following error :

java.lang.reflect.UndeclaredThrowableException
    at com.sun.proxy.$Proxy60.login(Unknown Source)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:273)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:262)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.login(DeployBDMOperation.java:122)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:85)
    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:28006/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.$Proxy60.login(Unknown Source)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginTenant(BOSEngineManager.java:273)
    at org.bonitasoft.studio.engine.BOSEngineManager.loginDefaultTenant(BOSEngineManager.java:262)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.login(DeployBDMOperation.java:122)
    at org.bonitasoft.studio.businessobject.core.operation.DeployBDMOperation.run(DeployBDMOperation.java:85)
    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: 
    at org.apache.http.impl.client.AbstractResponseHandler.handleResponse(AbstractResponseHandler.java:69)
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:65)
    at org.apache.http.impl.client.BasicResponseHandler.handleResponse(BasicResponseHandler.java:51)
    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:169)
    ... 9 more

 

Can you please help me understand the origin of my problem?

The Studio is not meant to be use with another environment than the one provided (bundle with H2).

I recommend installing the Tomcat Bundle with Postgres aside the Studio if you need to do some Postgres specific tests. Or you can use the Bonita docker image and follow the documentation.

HTH
Romain

So I tried downloading the bonita docker image, it worked fine, but i am having trouble importing my project from the bonita studio (on desktop) onto the bonita portal (in the docker)

Here are the steps :

  • exported/imported the organization [OK]
  • exported/imported the resources [OK]
  • exported the BDM [OK]
    • imported the BDM [ERROR]

when importing the bdm.zip in the portal (containing the bom.xml file) i get an error saying : File format may be invalid. For more information, check the log file.

I am using the bdm.zip file that i exported from the portal of the desktop version of the bonita

do you see a reason behind this error ? or is there another way to import the bdm onto the bonita docker version ? (knowing that the docker version has no studio interface since it is a docker)

No, that's the proper way. Are you using the same Studio and Engine version ? Is there more errors in engine logs ?