mynttt / UpdateTool

A tool to update the IMDB ratings for Plex libraries that contain movies/series and use the IMDB agent to receive ratings
GNU General Public License v3.0
250 stars 12 forks source link

IllegalStateException exception encountered #4

Closed ookla-ariel-ride closed 4 years ago

ookla-ariel-ride commented 4 years ago

I am getting the following error on my system (Ubuntu 18.04.3 w/openjdk 11)

[INFO ] - 2019-12-29 03:37:34 @ ImdbPipeline.accumulateMetadata: Items: 14481 [INFO ] - 2019-12-29 03:37:34 @ ImdbPipeline.accumulateMetadata: Metadata missing for: 240 [INFO ] - 2019-12-29 03:37:34 @ ImdbPipeline.accumulateMetadata: Retrieving metadata... [INFO ] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: Job returned ERROR : null [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: IllegalStateException exception encountered... [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: Please contact the maintainer of the application with the stacktrace below if you think this is unwanted behavior. [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: ======================================== [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: java.lang.IllegalStateException: API call failed with code 200: {"Response":"False","Error":"Error getting data."} at updatetool.imdb.ImdbOmdbWorker.call(ImdbOmdbWorker.java:68) at updatetool.imdb.ImdbOmdbWorker.call(ImdbOmdbWorker.java:16) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: ======================================== [ERROR] - 2019-12-29 03:37:36 @ ImdbDockerImplementation$ImdbBatchJob.run: The application will terminate now.

mynttt commented 4 years ago

Extremely interesting! The OMDB Api has one problem: it's sends out HTTP Status code 200 even when a request failed. The response boolean is their way of saying something went wrong instead of just sending something in the 500+ range.

I think if you run it again it should work fine again. I will update the retry loop tho to handle this special case and fail with a more descriptive message. Thanks for submitting!

mynttt commented 4 years ago

Closed with 88d7fdabb9008a809daeb04b27344353050f040f