Skip to content

Instantly share code, notes, and snippets.

@knalli
Created July 29, 2014 19:52
Show Gist options
  • Save knalli/bdebd651a0adab2da457 to your computer and use it in GitHub Desktop.
Save knalli/bdebd651a0adab2da457 to your computer and use it in GitHub Desktop.
OS X & Java: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
# Sometimes some Java applications will not work because the internal references to the trusted libs are broken.
# Unless '/System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security' does not exist, this should help
$ sudo mkdir -p /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security
$ cd /System/Library/Java/Support/CoreDeploy.bundle/Contents/Home/lib/security
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/cacerts
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/blacklist
$ sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/security/trusted.libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment