• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl:  RSS feed

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am having https service url. I wrote java client using SAAJ. but i am getting the below exception:--

java.security.PrivilegedActionException: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Message send failed
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

>> I exported the certificate from service URL (using browser.) and saved as jssecacerts
>>Then imporetd this by using the following command--> keytool -import -file jssecacerts -keystore cacerts

Now I wrote the java client using SAAJ as below:-

System.setProperty("javax.net.ssl.keyStore", "C:/Program Files/Java/jre6/lib/security/cacerts");
System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
URL url = new URL("https://whaever.com/service");
SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();
connection = scf.createConnection();
response = connection.call(message, url);

I dont know where I am wrong...Please help...me....I am in seriously in trouble..
Thanks in Advance..
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Have you tried using the following VM arguments when launching the client (removing the code that sets the properties in your code)?
-Djavax.net.ssl.trustStore=C:/Program Files/Java/jre6/lib/security/cacerts
-Djavax.net.ssl.trustStorePassword=changeit
-Djavax.net.debug=all

The last property is for debug output of SSL handshaking, so it may be omitted.
Best wishes!
 
Ranjandev shukla
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.........

Anyhow I fixed it...Thanks to all..
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you tell me , how to solve the problem? you can send the answer to my email (yangjiangyun88@163.com), Thank you very much!
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ranjandev shukla wrote:Thanks.........

Anyhow I fixed it...Thanks to all..




god! can you tel hwo to fix it ?  trouble me a lot!  thanks!!!   please~    please send the solution to this address :  qooge@vip.qq.com      thanks a lot!!
 
Everybody! Do the Funky Monkey! Like this tiny ad!
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!