Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting javax.net.ssl.trustStore in EJB

843830Nov 28 2006
Hi,

I want to call a web service from an EJB and need a certification to do so.
I imported this cert into a keystore and put it into my JAR file (which is in the
EAR). How do I have to set javax.net.ssl.trustStore?
System.setProperty(
   "javax.net.ssl.trustStore",
   "keystore");
nor
System.setProperty(
   "javax.net.ssl.trustStore",
   "/keystore");
worked :( I always get this Exception:
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
        at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:183)
        at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:103)
        at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:87)
        at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:54)
        ... 89 more
Any ideas? Thanks!
-Danny
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 26 2006
Added on Nov 28 2006
0 comments
329 views