I had exactly the same problem, and I blamed CXF at the beginning, but in fact the certificates were not valid for the class path. The first thing to check is that the file in the jar is the same as in the project structure (before packing in the jar).
Suspicions and possible solutions are possible here:
1) If you use Maven, the filtering process can ruin the binaries (my case)
Solution: Exclude certificates from the Maven filtering process, for example:
<resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*</include> </includes> <excludes> <exclude>**/*.jks</exclude> </excludes> </resource> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> <includes> <include>**/*.jks</include> </includes> </resource> </resources>
2) If you use the maven-assembly-plugin to create your distribution, this may damage the binaries:
Solution: http://jira.codehaus.org/browse/MASSEMBLY-412
source share