1
  • I/O exception (org.apache.axis2.AxisFault) caught when processing request: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

After migrating from jdk 1.5 to jdk 1.7 i am getting sun.security.validator.ValidatorException.

Steps : Replaced jdk 1.5 with 1.7(includes jre). Compile the code with jdk1.7. Compilation was success. while accessing the url with the certificate provided by the server i am getting sun.security.validator.ValidatorException in jdk1.7. But the exception is not thrown in jdk1.5. In cacerts file i have imported the specific certificate with alias name xxxx. If i access the url with the domain name as alias name in jdk1.7 name in certificate the exception is not thrown and works fine...

Do i need to do anything for migrating jdk1.5 to jdk1.7? Do i really missing some thing in the above process?

Any help will be appreciated...

Shriram
  • 4,343
  • 8
  • 37
  • 64
  • What if you access the URL in a browser, or with `curl`? – artbristol Nov 01 '13 at 09:19
  • Does your certificate contain a critical extension? [JDK Bug 6668231](http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6668231) mentions a difference in behavior of Java 5 and 7. It also says _... must reject the certificate/CRL if it encounters a critical extension it does not recognize._ – halfbit Nov 01 '13 at 11:48
  • 1
    Which cacerts file did you import the certificate into? And which JRE is actually being used when you run? For example, on Windows, when you install a JDK, you are actually installing 2 JREs...one in the JDK folder, and one in the Java folder. – gtrig Nov 02 '13 at 02:14

1 Answers1

0

Self signed certificate which was sent by server with no extensions.

version of the certificate is 1.

i am using /jdk1.7/jre/lib/security/cacerts with only jre 1.7. Also i have checked the cacerts file. Certificate details was updated properly.

Shriram
  • 4,343
  • 8
  • 37
  • 64