This is my error:
java.lang.ExceptionInInitializerError: java.lang.SecurityException:
Cannot set up certs for trusted CAs: java.lang.SecurityException:
Cannot locate policy and/or framework files for signer restraint
check!
I have seen it posted a couple other places on the site but I have not
seen a good answer to the issue. All the questions are older, so I
assume that new versions of Java have corrected the issue, but we are
unfortunately stuck on 1.2.
Some specifics:
In addition to the java version, I am also dynamically specifying
the provider as the SunJCE. I am using JCE 1.2.1.
A caveat:
This works perfectly when I test it by running a main class. When I
run it on Tomcat through a web interface is the only time I get the
error. I checked my java.security files and they are exactly the
same. Do I need to specify the SunJCE provider statically?
Mike Nishizawa - 03 Feb 2004 14:16 GMT
I found my own error. The problem was that I needed the jce jar files
in the $JAVA_HOME/jre/lib/ext directory. Also needed to set up is to
add the line in the local_policy.jar file to your java.policy file in
$JAVA_HOME/jre/lib/security directory. Now it works with no problem.
One other thing is that you have to make sure you set this up in the
jre that your application server uses as many come with their own by
default.
> This is my error:
>
[quoted text clipped - 17 lines]
> error. I checked my java.security files and they are exactly the
> same. Do I need to specify the SunJCE provider statically?