Error while invoking deployment rest api

While attempting to upload the bpmn file using rest api as below, I am getting the error

here is the code:
String serverUrl = http://localhost:8080/flowable-rest/service/repository/deployments

HttpHeaders httpHeaders = setHeader(MediaType.APPLICATION_JSON.toString(),MediaType.MULTIPART_FORM_DATA.toString(), “admin”, “test”);
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
body.add(“file”, mpFile);
HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(body, httpHeaders);
ResponseEntity response = new RestTemplate().postForEntity(serverUrl, requestEntity, String.class);

<>

getting the below error

“status”: 500,
“error”: “Internal Server Error”,
“message”: "Type definition error: [simple type, class java.util.logging.ErrorManager]; nested exception is com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class java.util.logging.ErrorManager and no properties discovered to create BeanSerializer
(to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)

Kindly advise to resolve this.