0

I am getting this error, test cases are getting failed, while upgrading the application to Java 17.

I am using dependencies :

com.jayway.restassured:rest-assured:2.8.0
com.jayway.restassured:json-schema-validator:2.8.0

Error:

java.lang.IllegalStateException: Failed to load ApplicationContext
    at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:98)
    at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:118)
    at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83)

I have tried upgrading the dependencies to :

com.jayway.restassured:rest-assured:4.1.2
com.jayway.restassured:json-schema-validator:4.1.2

but still facing this error :

PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:371)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:314)
    at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:309)
    at java.base/sun.security.ssl.CertificateMessage$T13CertificateConsumer.checkServerCerts(CertificateMessage.java:1357)
Azhar Khan
  • 3,829
  • 11
  • 26
  • 32
  • You need to provide more details like commands, POM.xml, any source that you are running, config etc. Is your internet accessed via corporate proxy? – Azhar Khan Feb 07 '23 at 05:27

0 Answers0