Cannot find serializer for value 'Untyped value

Hi

I get the error:
Cannot find serializer for value ‘Untyped value ‘test.ObjectDTO@4a189a62’, isTransient = false’.

When I try to put the following object on the process as a variable:

package test;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import ObjectTypeEnum;
import java.time.LocalDateTime;
import java.util.List;

@JsonInclude(JsonInclude.Include.NON_NULL)
public class ObjectDTO {

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime date;
private Long Id;
private List<TestDTO> testDTOList;
public Long getId() {
    return id;
}
public void setId(Long id) {
    this.id = id;
}
public List<TestDTO> getTestDTOList() {
    return testDTOList;
}
public void setTestDTOList(List<TestDTO> testDTOList) {
    this.testDTOList = testDTOList;
}
public LocalDateTime getDate() {
    return date;
}
public void setDate(LocalDateTime date) {
    this.date = date;
}

}

I try with this code:

ObjectDTO objectDTO = new ObjectDTO();
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RuntimeService runtimeService = processEngine.getRuntimeService();
runtimeService.createProcessInstanceByKey(processKey)
.setVariable(“someId”, someId)
.setVariable(“anotherId”, anotherId)
.setVariable(“objectDTO”, objectDTO)
.businessKey(businessKey)
.execute();

Br

Frank