Custom Tables in PostgreSQL database

Hi,

I have a Spring Boot Application. Camunda tables are in a PostgreSQL database. Now I want to create my own entities and create custom tables in the same database.
Table creation is done, I can read (Get) data from it, however, I can’t write into it. Post, Put and delete methods always return the following error :
“java.lang.IllegalStateException: Cannot create a session after the response has been committed”
I was wondering if this issue is related to some specific rules or rights, especially that I tried the same CRUD methods on another postgresql database (without camunda) and they worked.

Thanks in advance.

Hi, have you created your own APIs using a springboot controller? I suspect you get this issue because there is a camunda session filter in the spring config which your rest end points are not using…

Regards

Rob

Yes @Webcyberrob , I’ve created my model, the table is created. I created the controller, the GET methods work fine, however POST methods always return that session error… For the Camunda session filter, I have no idea about this honestly… Should I be adding some config to be able to manipulate new tables in the same database ?

Hi Touna,

this thread may be of interest. Its a bit of a mixed bag and may depend on the springboot version, your web security config and the path you access the APIs by…

Perhaps the first thing to try is change the path to your api so its does not get caught in current filters. This may or may not work, but if you get an access denied, at least you know your heading in the right direction…

regards

Rob

2 Likes

Thank you so much @Webcyberrob… You saved my day !
This is the problem explanation… I used /api without knowing it and as I changed it, now it works !

Best regards,
Touna.

Were you able to post data into the custom tables using mybatis or did you use the traditional jdbc method?

Hi @Sandeep_Yalamarthi,
I used the traditional method.