Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31278 > unrolled thread

How do I solve this issue on Eclipse

Started byumesh.sundareshan@gmail.com
First post2015-03-05 20:20 -0800
Last post2015-03-06 09:26 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  How do I solve this issue on Eclipse umesh.sundareshan@gmail.com - 2015-03-05 20:20 -0800
    Re: How do I solve this issue on Eclipse Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2015-03-06 09:26 +0000

#31278 — How do I solve this issue on Eclipse

Fromumesh.sundareshan@gmail.com
Date2015-03-05 20:20 -0800
SubjectHow do I solve this issue on Eclipse
Message-ID<3e12435f-e1e1-479d-8b8d-0920c0d9ab52@googlegroups.com>
Hi,

I have a JAVA program that's trying to make a webservice call using client authentication with a P12 certificate. I am setting the System properties as below.

System.setProperty("javax.net.ssl.keyStore", certLocation);
System.setProperty("javax.net.ssl.keyStorePassword", "password");
System.setProperty("javax.net.ssl.keyStoreType","PKCS12");

When I run the program """using eclipse""", I get an exception as below. Can someone please help me with this.

Thanks,
Umesh

org.apache.axis2.AxisFault: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:389)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:438)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
	at com.symantec.schemas.vip._2011._04.vipuserservices.mgmt.ManagementServiceStub.createUser(Unknown Source)
	at com.symantec.vip.loadtest.ShadowCredentialLoadTest.createUser(ShadowCredentialLoadTest.java:147)
	at com.symantec.vip.loadtest.ShadowCredentialLoadTest.main(ShadowCredentialLoadTest.java:204)
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
	at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:248)
	at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:116)
	at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
	at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
	at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:550)
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
	... 10 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.SSLContextImpl$DefaultSSLContext)
	at java.security.Provider$Service.newInstance(Provider.java:1619)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:236)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
	at javax.net.ssl.SSLContext.getInstance(SSLContext.java:156)
	at javax.net.ssl.SSLContext.getDefault(SSLContext.java:96)
	at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:122)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:112)
	... 19 more
Caused by: java.io.IOException: Invalid keystore format
	at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
	at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
	at java.security.KeyStore.load(KeyStore.java:1433)
	at sun.security.ssl.SSLContextImpl$DefaultSSLContext.getDefaultKeyManager(SSLContextImpl.java:795)
	at sun.security.ssl.SSLContextImpl$DefaultSSLContext.<init>(SSLContextImpl.java:675)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
	at java.lang.Class.newInstance(Class.java:433)
	at java.security.Provider$Service.newInstance(Provider.java:1593)
	... 29 more
 

[toc] | [next] | [standalone]


#31279

FromAndreas Leitgeb <avl@auth.logic.tuwien.ac.at>
Date2015-03-06 09:26 +0000
Message-ID<slrnmfiso7.uoi.avl@login.logic.tuwien.ac.at>
In reply to#31278
umesh.sundareshan@gmail.com <umesh.sundareshan@gmail.com> wrote:
> I have a JAVA program that's trying to make a webservice call using client authentication with a P12 certificate. I am setting the System properties as below.
> System.setProperty("javax.net.ssl.keyStore", certLocation);
> System.setProperty("javax.net.ssl.keyStorePassword", "password");
> System.setProperty("javax.net.ssl.keyStoreType","PKCS12");
> When I run the program """using eclipse""", I get an exception as below. Can someone please help me with this.
>
> Caused by: java.io.IOException: Invalid keystore format

If """""using eclipse""""" means "running on a Windows PC" for you,
then maybe transferring the file to your PC corrupted it (line-feed-
conversion?)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web