I came across this post looking for solutions to the same error.
In my case the issue was the Java 1.6 does not handle the bigger encryption keys. I patched the JVM to use Bouncy Castle.
In the java.security I set them as number 2, instead of "sun.security.rsa.SunRsaSign".
See https://www.bouncycastle.org/specifications.html#install
The provider can also be configured as part of your environment via
static registration by adding an entry to the java.security properties
file (found in $JAVA_HOME/jre/lib/security/java.security, where
$JAVA_HOME is the location of your JDK/JRE distribution). You'll find
detailed instructions in the file but basically it comes down to
adding a line:
security.provider.N=org.bouncycastle.jce.provider.BouncyCastleProvider
Where N is the preference you want the provider at (1 being the most
prefered).
Where you put the jar is up to mostly up to you, although with jdk1.3
and jdk1.4 the best (and in some cases only) place to have it is in
$JAVA_HOME/jre/lib/ext. Note: under Windows there will normally be a
JRE and a JDK install of Java if you think you have installed it
correctly and it still doesn't work chances are you have added the
provider to the installation not being used.
Note: with JDK 1.4 and later you will need to have installed the
unrestricted policy files to take full advantage of the provider. If
you do not install the policy files you are likely to get something
like the following:
java.lang.SecurityException: Unsupported keysize or algorithm parameters
at javax.crypto.Cipher.init(DashoA6275)
The policy files can be found at the same place you downloaded the
JDK.