Java Object Process Variable contains enum types


#1

Hi there,

I have a process variable of a complex java type, which has 2 enum type properties. When starting the process it hangs up after processing (I guess, when persisting the variable). After killing the tomcat there are some messages about failing to stop a thread.

Finally the following message is written:

The error may involve org.camunda.bpm.engine.impl.persistence.entity.VariableInstanceEntity.insertByteArray-Inline

The error occurred while setting parameters

SQL: insert into ACT_GE_BYTEARRAY(ID_, NAME_, BYTES_, DEPLOYMENT_ID_, REV_) values ( ?, ?, ?, ?, 1 )]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

When I substitute the enum properties by string properties everything is fine.

Is there anything to do when persisting java objects with enum properties?

Stephan


#2

Hi Stephan,

Please create a unit test that reproduces this behavior. You can use the unit testing template for this purpose.

Thanks,
Thorben


#3

Hi Thorben,

I have one, but it starts a complete spring context and executes some liquibase scripts and so on. Extending your unit testing template, just to add a java process variable with an enum property works fine.

So I decided to continue “playing around” a bit and got some new findings:

Storing the java class with enum properties fails, when using a H2 server db. But it works when using a H2 memory or embedded db.

So, for the moment I’m fine. Hoping we will not meet again, when using an oracle db on our shared development environment. :wink:

Thanks,
Stephan