Pagination Ticket

I updated the program for pagination and all tests are green but the status page is not updating.
Any idea?

1 Like

Hi @masif79,

Can you share a printscreen of your status page ?

I am having the same issue, I implemented pagination with normal approach and using aggregate having test all case pass successfully, but status page shows “Paging: Did not receive the proper response when paging by cast”.

I noticed a call to endpoint: http://localhost:5001/api/v1/movies/search?genre=Reality-TV
returning only two movies which is correct:

{“movies”:[{“title”:“The Adonis Factor”,“year”:0,“cast”:[“Anthony O’Brien”,“Shane Stiel”,“Dakota Rivers”,“Bruce Vilanch”],“plog”:“Gay men and their pursuit of physical perfection.”,“fullPlot”:“Gay men and their pursuit of physical perfection.”,“lastUpdated”:“2015-08-17T05:12:25.000+0000”,“type”:“movie”,“poster”:“",“directors”:["Christopher Hines”],“writers”:[“Christopher Hines”],“imdb”:{“id”:1563778,“votes”:127,“rating”:5.5},“countries”:[“USA”],“genres”:[“Documentary”,“Reality-TV”],“tomatoes”:{“lastUpdated”:null,“viewer”:{“rating”:2.5,“numReviews”:8}},“comments”:null,"_id":“573a13caf29313caabd7cff6”},{“title”:“Louis Theroux: Transgender Kids”,“year”:0,“cast”:[“Louis Theroux”],“plog”:“Louis Theroux travels to San Francisco where a group of doctors help kids who claim to be born in the wrong body.”,“fullPlot”:“Louis Theroux travels to San Francisco where a group of doctors help kids who claim to be born in the wrong body.”,“lastUpdated”:“2015-09-07T05:44:41.000+0000”,“type”:“movie”,“poster”:null,“directors”:[“Tom Barrow”],“writers”:[“Louis Theroux”],“imdb”:{“id”:4613322,“votes”:100,“rating”:7.4},“countries”:[“UK”],“genres”:[“Documentary”,“Reality-TV”],“tomatoes”:null,“comments”:null,"_id":“573a13f9f29313caabdeaa97”}],“entries_per_page”:20,“page”:0,“filters”:{“genre”:[“Reality-TV”]},“total_results”:0}

@Norberto Thank you for your reply, the fixed now, one of the method was missing implementation.

Same Here i am still seeing status page with error. restarted application few times

Any error messages on the console?

Yes, I see this trace “java.lang.IllegalArgumentException: invalid hexadecimal representation of an ObjectId: [foobar]
at org.bson.types.ObjectId.parseHexString( ~[bson-3.9.1.jar:na]”

1 Like

I don’t think this should effect Pagination Ticket. But that can be fix with a try/catch but it is for the next chapter. If you fix this you will see another Ticket going green but I would try it in case it fixes this issue too. If you implement validIdValue the error should go away.

This is another error line i see before the illegalArgumentException.

2019-02-23 19:17:43.435 INFO 2528 — [nio-5000-exec-8] org.mongodb.driver.connection : Opened connection [connectionId{localValue:9, serverValue:3627907}] to
2019-02-23 19:17:43.478 ERROR 2528 — [nio-5000-exec-4] : Unauthorized error: Bad credentials
2019-02-23 19:17:43.508 ERROR 2528 — [nio-5000-exec-1] : Unauthorized error: Bad credentials
2019-02-23 19:17:43.533 ERROR 2528 — [nio-5000-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: invalid hexadecimal representation of an ObjectId: [foobar]] with root cause

1 Like

I saw the other query about hexadecimal objectID: solution to that was

" i have corrected a mistake in the method getMoviesByCast, i changed the Bson sort from
Sorts.ascending(sortKey) to Sorts.descending(sortKey), now it works fine" tried this and it worked. still trying to figure out the relation between these two


It worked, even if the test case and the application verification seem to be unrelated. Thank you!

worked for validation code. thank u