hi everyone
today i tried to deploy my bpmn digaram to engine via rest api and i used below feign rest api to do that:
@RequestMapping(value = "/deployment/create",
produces = { "application/json" },
consumes = { "multipart/form-data" },
method = RequestMethod.POST)
ResponseEntity<DeploymentWithDefinitionsDto> createDeployment(@RequestPart(value = "deployment-source") String deploymentSource,
@RequestPart(value = "deploy-changed-only") Boolean deployChangedOnly,
@RequestPart(value = "enable-duplicate-filtering") Boolean enableDuplicateFiltering,
@RequestPart(value = "deployment-name") String deploymentName,
@RequestPart(value = "deployment-activation-time") OffsetDateTime deploymentActivationTime,
@RequestPart(value = "data") MultipartFile data);
the problem is when Jackson converts Date to JSON it adds two “” as below and Camunda has written it’s own date deserializer for this service and error occures in server.
""2022-02-16T13:01:46.739+0330""
stack trace of exception is as below:
ENGINE-REST-HTTP500 java.lang.IllegalArgumentException: Invalid format: ""2022-02-16T19:18:33.8414451+03:30""
at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:866)
at org.camunda.bpm.engine.impl.calendar.DateTimeUtil.parseDateTime(DateTimeUtil.java:59)
at org.camunda.bpm.engine.impl.calendar.DateTimeUtil.parseDate(DateTimeUtil.java:63)