Java com.omdbapi.OmdbConnectionErrorException错误

Java com.omdbapi.OmdbConnectionErrorException错误,java,api,web-application-project,Java,Api,Web Application Project,我已经用java编写了一个代码,通过它我可以访问IMDB网站上的电影细节。为此,我在java中使用OMDB API,但我得到了连接错误,我不明白为什么,因为在输出信息中,它显示了有关电影的详细信息 代码: 错误: INFO: executing GET http://www.omdbapi.com/?t=star+wars HTTP/1.1 Mar 13, 2017 5:09:18 PM com.omdbapi.Omdb resultToJson INFO: received {"Title":

我已经用java编写了一个代码,通过它我可以访问IMDB网站上的电影细节。为此,我在java中使用OMDB API,但我得到了连接错误,我不明白为什么,因为在输出信息中,它显示了有关电影的详细信息

代码:

错误:

INFO: executing GET http://www.omdbapi.com/?t=star+wars HTTP/1.1
Mar 13, 2017 5:09:18 PM com.omdbapi.Omdb resultToJson
INFO: received {"Title":"Star Wars: Episode IV - A New   Hope","Year":"1977","Rated":"PG","Released":"25 May 1977","Runtime":"121 min","Genre":"Action, Adventure, Fantasy","Director":"George Lucas","Writer":"George Lucas","Actors":"Mark Hamill, Harrison Ford, Carrie Fisher, Peter Cushing","Plot":"Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the galaxy from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.","Language":"English","Country":"USA","Awards":"Won 6 Oscars. Another 50 wins & 28 nominations.","Poster":"https://images-na.ssl- images-amazon.com/images/M/MV5BYzQ2OTk4N2QtOGQwNy00MmI3LWEwNmEtOTk0OTY3NDk2MGJkL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyNjc1NTYyMjg@._V1_SX300.jpg","Metascore":"92","imdbRating":"8.7","imdbVotes":"963,318","imdbID":"tt0076759","Type":"movie","Response":"True"}
 Exception in thread "main" com.omdbapi.OmdbConnectionErrorException:        Unrecognized field "Metascore" (class com.omdbapi.Movie), not marked as ignorable (15 known properties: , "Plot", "Response", "Genre", "Rated",  "imdbVotes", "Director", "Poster", "Writer", "Title", "Runtime", "Year", "imdbID", "Released", "Actors", "imdbRating"])
at [Source: java.io.StringReader@dd3b207; line: 1, column: 40] (through  reference chain: com.omdbapi.Movie["Metascore"])
at com.omdbapi.Omdb.getOneMovie(Omdb.java:65)
at com.omdbapi.Omdb.searchOneMovie(Omdb.java:54)
at test.searchMovie.main(searchMovie.java:15)

您需要的是
Metascore
字段,但它不在那里-请删除它或将其标记为ingorable。IMDB的响应很好-没有错误,代码中有错误

您需要的是Metascore字段,但它不在那里-删除它或将其标记为ingorable。回答很好,您的代码中有错误。但是我的代码中有什么错误???因为它只包含这三行来获取电影信息
INFO: executing GET http://www.omdbapi.com/?t=star+wars HTTP/1.1
Mar 13, 2017 5:09:18 PM com.omdbapi.Omdb resultToJson
INFO: received {"Title":"Star Wars: Episode IV - A New   Hope","Year":"1977","Rated":"PG","Released":"25 May 1977","Runtime":"121 min","Genre":"Action, Adventure, Fantasy","Director":"George Lucas","Writer":"George Lucas","Actors":"Mark Hamill, Harrison Ford, Carrie Fisher, Peter Cushing","Plot":"Luke Skywalker joins forces with a Jedi Knight, a cocky pilot, a wookiee and two droids to save the galaxy from the Empire's world-destroying battle-station, while also attempting to rescue Princess Leia from the evil Darth Vader.","Language":"English","Country":"USA","Awards":"Won 6 Oscars. Another 50 wins & 28 nominations.","Poster":"https://images-na.ssl- images-amazon.com/images/M/MV5BYzQ2OTk4N2QtOGQwNy00MmI3LWEwNmEtOTk0OTY3NDk2MGJkL2ltYWdlL2ltYWdlXkEyXkFqcGdeQXVyNjc1NTYyMjg@._V1_SX300.jpg","Metascore":"92","imdbRating":"8.7","imdbVotes":"963,318","imdbID":"tt0076759","Type":"movie","Response":"True"}
 Exception in thread "main" com.omdbapi.OmdbConnectionErrorException:        Unrecognized field "Metascore" (class com.omdbapi.Movie), not marked as ignorable (15 known properties: , "Plot", "Response", "Genre", "Rated",  "imdbVotes", "Director", "Poster", "Writer", "Title", "Runtime", "Year", "imdbID", "Released", "Actors", "imdbRating"])
at [Source: java.io.StringReader@dd3b207; line: 1, column: 40] (through  reference chain: com.omdbapi.Movie["Metascore"])
at com.omdbapi.Omdb.getOneMovie(Omdb.java:65)
at com.omdbapi.Omdb.searchOneMovie(Omdb.java:54)
at test.searchMovie.main(searchMovie.java:15)