Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8747761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:24:37+00:00 2026-06-13T12:24:37+00:00

When I am trying to access rezgo sample api using restful webservice I am

  • 0

When I am trying to access rezgo sample api using restful webservice I am getting exception. I want to get convert this response in sample object

package com.mycompany.hr.client;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.client.RestOperations;
import org.springframework.web.client.RestTemplate;
import org.springframework.ws.client.core.WebServiceTemplate;
public class Main {

    public static void main(String[] args) throws Exception {

        List<MediaType> acceptableMediaTypes = new ArrayList<MediaType>();
          acceptableMediaTypes.add(MediaType.APPLICATION_XML);
          HttpHeaders headers = new HttpHeaders();
          headers.setAccept(acceptableMediaTypes);
          //ResponseEntity<String> result = restTemplate.exchange("http://localhost:8080/spring-rest-provider/krams/person/{id}", HttpMethod.PUT, entity, String.class, id);
          Map<String,String> urlParam=new HashMap<String,String>();
          urlParam.put("key","2D8-F3V0-X7C0-C6I");
          urlParam.put("transcode", "p103");
          urlParam.put("i", "p103");
          urlParam.put("t", "tag");
          urlParam.put("q", "nature");

          RestTemplate wsTemplate = new RestTemplate();
         ResponseEntity<TourList> tl=( wsTemplate).getForEntity("http://xml.rezgo.com/xml?key=2D8-F3V0-X7C0-C6I&transcode=p103&i=search_items&t=tag&q=nature",TourList.class,Collections.singleton(urlParam));

    }

}

this is my code I am getting following exception.

Exception in thread "main" java.lang.NoSuchMethodError: org.springframework.util.CollectionUtils.unmodifiableMultiValueMap(Lorg/springframework/util/MultiValueMap;)Lorg/springframework/util/MultiValueMap;
    at org.springframework.web.util.UriComponents.<init>(UriComponents.java:100)
    at org.springframework.web.util.UriComponentsBuilder.build(UriComponentsBuilder.java:222)
    at org.springframework.web.util.UriComponentsBuilder.build(UriComponentsBuilder.java:212)
    at org.springframework.web.util.UriTemplate.<init>(UriTemplate.java:70)
    at org.springframework.web.client.RestTemplate$HttpUrlTemplate.<init>(RestTemplate.java:653)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:407)
    at org.springframework.web.client.RestTemplate.getForEntity(RestTemplate.java:229)
    at com.mycompany.hr.client.Main.main(Main.java:52)

please help me resolve this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:24:38+00:00Added an answer on June 13, 2026 at 12:24 pm

    CollectionUtils.unmodifiableMultiValueMap was added in Spring 3.1 but does not appear in earlier versions. Sounds like you are building your application using spring-core 3.1, but your runtime environment is using an earlier version.

    Perhaps you upgraded Spring recently and have a stale lib directory somewhere that includes multiple versions of spring-core? In my experience Java always seems to pick the wrong one (older) and I get errors like these. Make sure you do not have spring-core 3.0 or earlier anywhere in your environment.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to access data-onload using $(#index).data(onload) I get back 'undefined' : <script type=text/html>
trying to access http://forum.worldoftanks.eu/index.php?app=members using apache HttpClient but keep getting 403. Can anyone help
Am trying to access an API using CURL I can access the API from
I am trying access a REST API. I can get it working in Curl/REST
Hi I'm trying to access a WCF service which returns a JSON Array using
I am trying to access a file for xml parsing with this: InputStream inputStream
Im trying to access youtube account with account manager, meaning i want to access
After trying to access ivars using KVC, I have noticed that there was no
I am trying to access a file via a URI using the FTP protocol.
Trying to access github using the following command fails with the verification failed error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.