<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z000074vxRzCAIOkta Classic EngineIntegrationsAnswered2021-07-29T13:30:15.000Z2021-07-26T11:29:46.000Z2021-07-29T13:30:15.000Z

SoumyaD.47688 (Customer) asked a question.

Getting exception while starting app in Spring Boot

Hi,

I am getting below exception in my spring boot simple app. Kindly help me! Thanks in advance.

 

2021-07-26 16:42:25.670 INFO 17596 --- [      main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$99b3d963] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

 

 .  ____     _      __ _ _

 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/ ___)| |_)| | | | | || (_| | ) ) ) )

 ' |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::    (v2.1.4.RELEASE)

 

2021-07-26 16:42:31.566 ERROR 17596 --- [      main] o.s.boot.SpringApplication        : Application run failed

 

org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://dev-63888993.okta.com/oauth2/default/.well-known/openid-configuration": sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:744) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:710) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:329) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at com.okta.spring.oauth.discovery.OidcDiscoveryClient.discover(OidcDiscoveryClient.java:56) ~[okta-spring-security-oauth2-0.6.0.jar:0.6.0]

at com.okta.spring.oauth.discovery.DiscoveryPropertySource.getDiscoveryMetadata(DiscoveryPropertySource.java:105) ~[okta-spring-security-oauth2-0.6.0.jar:0.6.0]

at com.okta.spring.oauth.discovery.DiscoveryPropertySource.getProperty(DiscoveryPropertySource.java:77) ~[okta-spring-security-oauth2-0.6.0.jar:0.6.0]

at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:202) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:175) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.initialize(EnvironmentDecryptApplicationInitializer.java:105) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.cloud.bootstrap.BootstrapApplicationListener$DelegatingEnvironmentDecryptApplicationInitializer.initialize(BootstrapApplicationListener.java:413) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:649) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:373) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]

at com.javatechie.spring.okta.sso.SpringBootOktaSsoApplication.main(SpringBootOktaSsoApplication.java:22) [classes/:na]

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.ssl.Alerts.getSSLException(Alerts.java:198) ~[na:1.8.0_251]

at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1967) ~[na:1.8.0_251]

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:331) ~[na:1.8.0_251]

at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:325) ~[na:1.8.0_251]

at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1689) ~[na:1.8.0_251]

at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:226) ~[na:1.8.0_251]

at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1082) ~[na:1.8.0_251]

at sun.security.ssl.Handshaker.process_record(Handshaker.java:1010) ~[na:1.8.0_251]

at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1079) ~[na:1.8.0_251]

at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1388) ~[na:1.8.0_251]

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1416) ~[na:1.8.0_251]

at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1400) ~[na:1.8.0_251]

at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) ~[na:1.8.0_251]

at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) ~[na:1.8.0_251]

at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:167) ~[na:1.8.0_251]

at org.springframework.http.client.SimpleBufferingClientHttpRequest.executeInternal(SimpleBufferingClientHttpRequest.java:76) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:108) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at com.okta.spring.oauth.discovery.OidcDiscoveryClient$UserAgentInterceptor.intercept(OidcDiscoveryClient.java:69) ~[okta-spring-security-oauth2-0.6.0.jar:0.6.0]

at org.springframework.http.client.InterceptingClientHttpRequest$InterceptingRequestExecution.execute(InterceptingClientHttpRequest.java:92) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.InterceptingClientHttpRequest.executeInternal(InterceptingClientHttpRequest.java:76) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.AbstractBufferingClientHttpRequest.executeInternal(AbstractBufferingClientHttpRequest.java:48) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.http.client.AbstractClientHttpRequest.execute(AbstractClientHttpRequest.java:53) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:735) ~[spring-web-5.1.6.RELEASE.jar:5.1.6.RELEASE]

... 15 common frames omitted

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:450) ~[na:1.8.0_251]

at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:317) ~[na:1.8.0_251]

at sun.security.validator.Validator.validate(Validator.java:262) ~[na:1.8.0_251]

at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:330) ~[na:1.8.0_251]

at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:227) ~[na:1.8.0_251]

at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:132) ~


  • User15953055057917460785 (Developer Support)

    Hi there. Do you get this error when running the app locally? This could be due to a self-signed TLS cert on the domain making requests to Okta.

This question is closed.
Loading
Getting exception while starting app in Spring Boot
Okta Support Agent (Beta)

Terms of Service

Hello! I'm the Okta Support Agent (Beta), your go-to resource for questions about Okta products. Please remember for your security and privacy, do not share any Personally Identifiable Information (PII) such as passwords, IP addresses, or other details with me.

Okta Privacy Policy and Terms of Service apply