I had the same issue when first installing openjdk-9-jdk and then openjdk-8-jdk on Ubuntu.
I ended up uninstalling both, rm -rfing /etc/ssl/certs/java and /etc/java-*, reinstalling openjdk-8-jdk and running sudo update-ca-certificates -f, which fixed it for me.