java.sql.BatchUpdateException: String or binary data would be truncated

I have changed camunda embedded h2 database by my sql server database in order to get rid of this error :slight_smile:

but when i start work with sql server i got this exception:

here are several things i am interested in:

  1. as i have seen from camunda database it convert each instance data into bytearray and then saves this data in history tables, how should i prevent this process( i mean saving all data in histroy tables?)? in case data which i have received from service is huge, how can i save all this data inside camunda environment will i nee hisotry clean up or relative process?
    2.i have seen this implementation but it seems to work only on oracle, by the way do you know anything about history clean up implementation which works on sql server as well ?
  2. Can i use camunda inside updatting or adding it’s instance in HistoricVariableInstanceEntity, i mean does program uses this inctace later or it is just for monitoring?
  3. should i do any extra configuration on my camunda database ( i mean my sql server database) to increase size of instance?
    @yana.vasileva you are always helpful to me, do you have any idea about it?

Hi Sally,

Before answering your questions I need to understand couple of things:

  • Do you know why the BatchUpdateException occurs? You think it is related to the history somehow, I guess? Do you know how to reproduce the issue?
  • Do you need historic data? If not, you can easily disable it.

I will try to provide some details related to your questions:

  1. Yes, the process xml and the process variables are stored in ACT_GE_BYTEARRAY table.

You can switch off the history or granulate the history data which needs to be store by setting up another history level which suits to your requirements.

History cleanup can be configured on all supported by Camunda databases and works in the same way, as far as I know.

  1. As I said if you don’t need the historic data related to the variables, you can disabled it
  2. I didn’t actually get that can you explain further.

Hope that helps.

Best regards,

thanks :grinning::grinning:

Hi @Sally,

with this process engine plugin you can filter, which variables should be saved in the history:

The clean-up-history snippet you mentioned is years older than the clean up feature in the engine.

Hope this helps, Ingo

1 Like