This post was previously about getting Amazon ec2 API tools working on Debian Lenny when seeing something like this:
user@computer:$ ec2-describe-instances
Unexpected error:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
Unexpected error:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
After number of comments it looked as a generic solution to java related problems so I’ve change the title.
Here is how to fix it Java on Lenny:
user@computer:$ apt-get install openjdk-6-jre
mkdir /tmp/java
cd /tmp/java
wget http://ftp.de.debian.org/debian/pool/main/c/ca-certificates-java/ca-certificates-java_20100412_all.deb
ar xf ca-certificates-java_20100412_all.deb
tar -zxvf data.tar.gz
cd /usr/lib/jvm/java-6-openjdk/jre/lib/security/
mv cacerts cacerts.PREVIOUS
cp /tmp/java/usr/share/ca-certificates-java/cacerts /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts
mkdir /tmp/java
cd /tmp/java
wget http://ftp.de.debian.org/debian/pool/main/c/ca-certificates-java/ca-certificates-java_20100412_all.deb
ar xf ca-certificates-java_20100412_all.deb
tar -zxvf data.tar.gz
cd /usr/lib/jvm/java-6-openjdk/jre/lib/security/
mv cacerts cacerts.PREVIOUS
cp /tmp/java/usr/share/ca-certificates-java/cacerts /usr/lib/jvm/java-6-openjdk/jre/lib/security/cacerts
If you get 404 when running wget go here and download latest package.





