Search code examples
javassljacksonsslhandshakeexception

How to open SSL streams to multiple URLs properly with Jackson (Java)?


I'm working on a small java app that requests json data from an open online db, and I've run into the problem that the first URL has no issues having its stream opened (doesn't matter which URL I start with), but as soon as I try to use a second one I get "javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure".

I can't seem to find anything mentioning this on the internet, which seems kinda weird to me, so I wanted to actually ask how to do this properly, because I use Jackson to handle the incoming Json data, and while it has a method to just handle URLs, all that does is call openStream() which causes this problem. I'm using Java 11 for the record.

EDIT: Also forgot to mention it's a JavaFX application, if that could possibly be an issue


Solution

  • Thanks to @dave_thompson_085, I found out that it was an issue with Java 11.0.1 specifically, updating (to 11.0.11 in my case) solved the problem