here is my code. I've added all the dependencies then also getting such error. google-http-client-jackson2-1.17.0-rc.jar
here in this code in getting above mentioned error at JsonFactory jsonFactory = new JacksonFactory();
import com.google.api.services.customsearch.Customsearch; import com.google.api.services.customsearch.model.Search; import com.google.api.services.customsearch.model.Result; import com.google.api.client.http.HttpRequestInitializer; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.JsonFactory; import com.google.api.client.json.jackson2.JacksonFactory; protected SearchResult[] doSearch() { HttpRequestInitializer httpRequestInitializer = new HttpRequestInitializer() { @Override public void initialize(HttpRequest request) throws IOException { } }; JsonFactory jsonFactory = new JacksonFactory(); Customsearch csearch = new Customsearch( new NetHttpTransport(), jsonFactory, httpRequestInitializer); Customsearch.Cse.List listReqst; try { listReqst = csearch.cse().list(query.getQueryString()); listReqst.setKey(GOOGLE_KEY); // set the search engine ID got from API console listReqst.setCx("search engine ID"); // set the query string listReqst.setQ(query.getQueryString()); // language chosen is English for search results listReqst.setLr("lang_en"); // set hit position of first search result listReqst.setStart((long) firstResult); // set max number of search results to return listReqst.setNum((long) maxResults); //performs search Search result = listReqst.execute(); java.util.List<Result> results = result.getItems(); String urls[] = new String [result.size()]; String snippets[] = new String [result.size()]; int i=0; for (Result r : results){ urls[i] = r.getLink(); snippets[i] = r.getSnippet(); i++; } return getResults(snippets, urls, true); } catch (IOException e) { // TODO Auto-generated catch block MsgPrinter.printSearchError(e); System.exit(1); return null; } } kindly suggest me how it should be fixed.