java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

Solution Verified - Updated -

Issue

  • We are seeing this error when we deploy our Spring Framework application:
ERROR [STDERR] (http-example.com%2F10.1.2.3-8443-1) org.springframework.remoting.RemoteAccessException: Could not access HTTP invoker remote service at [https://example.com/mypage]; nested exception is javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
  • We are getting the following almost right away when deploying our application:
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException:
the trustAnchors parameter must be non-empty
    at sun.security.validator.PKIXValidator.<init>(Unknown Source)
    at sun.security.validator.Validator.getInstance(Unknown Source)
    at sun.security.ssl.X509 TrustManagerImpl.getValidator(Unknown Source)
    at sun.security.ssl.X509 TrustManagerImpl.checkTrustedInit(Unknown Source)
    at sun.security.ssl.X509 TrustManagerImpl.checkTrusted(Unknown Source)
    at sun.security.ssl.X509 TrustManagerImpl.checkServerTrusted(Unknown Source)
    at sun.security.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
    at sun.security.ssl.Handshaker.processLoop(Unknown Source)
    at sun.security.ssl.Handshaker.process_record(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    ... 38 more

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.