Camunda Server Exception

An error happened while submitting the task form : jdk/internal/reflect/SerializationConstructorAccessorImpl

I am tried to pass a complex Object through a Java delegate class but I was getting serialization/deserialization error message on the Camunda server. To solve this problem, I converted the Object to ByteString using Base64 serialization
Base64. getEncoder ().encodeToString(byteArray);

It works fine in the unit test but on Camunda Engine I am getting this error. jdk/internal/reflect/SerializationConstructorAccessorImpl

I have spent 8 hours, still no success.

@Waheed by default java serialization is disabled in camunda. To enable java serialization, configure the below property in the process.xml file like below:

<property name="javaSerializationFormatEnabled">true</property>

Refer this example:

Thank you, Let me try and then I will update you.

I can’t find javaSerializationFormatEnabled in your example. Exactly where I have to add this property?

Refer the below processes.xml:

<process-application
  xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

  <process-archive>
    <resource>process.bpmn</resource>
    <properties>
      <property name="isDeleteUponUndeploy">false</property>
      <property name="isScanForProcessDefinitions">true</property>
      <property name="javaSerializationFormatEnabled">true</property>
    </properties>
  </process-archive>

</process-application>

Mine looks like this. Sorry, I don’t have much experience with Camunda.

@Waheed files ends with *.bpmn is BPMN process file. The contents above which I gave is deployment descriptor file.

Copy those contents and create a file called processes.xml in the path

/src/main/resources/META-INF

Refer this example:

Thank you. I have updated processes.xml

Delegate Class

execution.setVariable("orderDataJava",

Variables.objectValue (NoobChain.gensisBlock()).serializationDataFormat(Variables.SerializationDataFormats.JAVA ).create());

Transaction Class
public class Transaction implements Serializable{}
I have added Serializable in all other classes as well. Still

Camunda Engine Error

An error happened while submitting the task form : jdk/internal/reflect/SerializationConstructorAccessorImpl

Which java version are you using? Jdk9?

This issue is so frustrating.

I think Camunda Engine is using JDK 9 or pervious versions and that is the issue.

@aravindhrs Thank you so much for your help.

Turned out the same reason, Camunda Engine is not using the latestest JDK version. I downgraded to JDK 8 and it worked. Wasted 2 days because of this reason.