Tenho uma aplicação que roda em JWS. Esta aplicação precisa salvar alguns arquivos localmente e esses arquivos estão no servidor https …
Quando tento salvar ele apresenta o seguinte erro:
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 com . sun . net . ssl . internal . ssl . Alerts . getSSLException ( Unknown Source )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . fatal ( Unknown Source )
at com . sun . net . ssl . internal . ssl . Handshaker . fatalSE ( Unknown Source )
at com . sun . net . ssl . internal . ssl . Handshaker . fatalSE ( Unknown Source )
at com . sun . net . ssl . internal . ssl . ClientHandshaker . serverCertificate ( Unknown Source )
at com . sun . net . ssl . internal . ssl . ClientHandshaker . processMessage ( Unknown Source )
at com . sun . net . ssl . internal . ssl . Handshaker . processLoop ( Unknown Source )
at com . sun . net . ssl . internal . ssl . Handshaker . process_record ( Unknown Source )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . readRecord ( Unknown Source )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . performInitialHandshake ( Unknown Source )
at com . sun . net . ssl . internal . ssl . SSLSocketImpl . startHandshake ( Unknown Source )
at sun . net . www . protocol . https . HttpsClient . afterConnect ( Unknown Source )
at sun . net . www . protocol . https . AbstractDelegateHttpsURLConnection . connect ( Unknown Source )
at sun . net . www . protocol . http . HttpURLConnection . getInputStream ( Unknown Source )
at sun . net . www . protocol . https . HttpsURLConnectionImpl . getInputStream ( Unknown Source )
at cyclops . dicomviewer . util . threads . FileRecorderThread . run ( FileRecorderThread . java : 61 )
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 ( Unknown Source )
at sun . security . validator . PKIXValidator . engineValidate ( Unknown Source )
at sun . security . validator . Validator . validate ( Unknown Source )
at com . sun . net . ssl . internal . ssl . X509TrustManagerImpl . checkServerTrusted ( Unknown Source )
at com . sun . net . ssl . internal . ssl . JsseX509TrustManager . checkServerTrusted ( Unknown Source )
… 12 more
Caused by : sun . security . provider . certpath . SunCertPathBuilderException : unable to find valid certification path to requested target
at sun . security . provider . certpath . SunCertPathBuilder . engineBuild ( Unknown Source )
at java . security . cert . CertPathBuilder . build ( Unknown Source )
… 17 more
java . lang . NullPointerException
at cyclops . dicomviewer . util . threads . FileRecorderThread . run ( FileRecorderThread . java : 81 )
não sei pq isso acontece … se é o certificado do servidor que não é confiavel … e se neste caso devo importar o certificado, e como??
obrigado