0

I am trying to sync the data to target cluster by rest call in java ,with below url https://hostname:port/hazelcast/rest/mancenter/wan/sync/map?clustername&groupname&mapname In host name we have cluster FQDN we are using that with respective keystore but getting internal server error 500 in java .But through Curl command Iam able to sync the data.But I need to implement as service Please help me.

  • It depends how you call the REST call in Java. Can you please share the implementation details and log output? – Alparslan Avci Dec 19 '18 at 15:30
  • I am using spring boot rest template – Manayam Srivalli Dec 19 '18 at 16:21
  • HttpHeaders headers = new HttpHeaders(); headers .setContentType(MediaType.APPLICATION_JSON);URI uri = new URI(https://hostname:port/hazelcast/rest/mancenter/wan/sync/map?clustername&groupname&mapname); HttpEntity entity = new HttpEntity(headers); restTemplate.excahnge(uri,HttpMethod.POST,entity,JsonNode.class) @AlparslanAvci – Manayam Srivalli Dec 19 '18 at 16:36
  • org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error. – Manayam Srivalli Dec 19 '18 at 17:33
  • Iam trying from last two days ,I didnt get any other error other than 500 but when I change any thing in url it is giving 400,or if I change any host name,then it shows unknown hostname.is there any details you need – Manayam Srivalli Dec 19 '18 at 17:36
  • Can you please try to send with content type `APPLICATION_FORM_URLENCODED ` instead of `APPLICATION_JSON` as in the example here: https://stackoverflow.com/a/38388168/3327350? – Alparslan Avci Dec 26 '18 at 17:10
  • Hi I am able to do sync operation through rest call between two clusters .Previously I used data as JsonNode in HttpEntity,But I need to pass data as String to post .I changes that one and I able to do sync through rest call in java client – Manayam Srivalli Jan 10 '19 at 20:10
  • Thank you so much for your response @AlparslanAvci.I have one doubt .when we are doing the sync operation we want to lock our hazelcast map operations .Is there any way to do in hazelcast.@AlparslanAvci – Manayam Srivalli Jan 10 '19 at 20:14

0 Answers0