I'm trying to run the SimpleClient example inside of Eclipse. I've set -Djavax.net.ssl.trustStore=~/vmware-certs/vmware.keystore and -Djavax.net.ssl.trustStorePassword=password, but I'm getting the following exception:
Caught Exception : Name : org.apache.axis.AxisFault Message : ; nested exception is:
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl) Trace :
AxisFault
faultCode: Server.userException
faultSubcode:
faultString: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
faultActor:
faultNode:
faultDetail:
stackTrace:java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:197)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:210)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.vmware.vim.VimBindingStub.retrieveServiceContent(VimBindingStub.java:19863)
at com.easystreet.vmware.testing.SimpleClient.connect(SimpleTest.java:55)
at com.easystreet.vmware.testing.SimpleClient.main(SimpleTest.java:217)
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
at java.security.Provider$Service.newInstance(Provider.java:1263)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:165)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:143)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:86)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:120)
at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)
... 15 more
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:79)
at java.io.InputStreamReader.<init>(InputStreamReader.java:73)
at sun.security.provider.CertBundleKeyStoreImpl.engineLoad(CertBundleKeyStoreImpl.java:142)
at java.security.KeyStore.load(KeyStore.java:1202)
at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(TrustManagerFactoryImpl.java:221)
at sun.security.ssl.DefaultSSLContextImpl.getDefaultTrustManager(DefaultSSLContextImpl.java:88)
at sun.security.ssl.DefaultSSLContextImpl.<init>(DefaultSSLContextImpl.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:539)
at java.lang.Class.newInstance0(Class.java:373)
at java.lang.Class.newInstance(Class.java:326)
at java.security.Provider$Service.newInstance(Provider.java:1239)
... 22 more
hostname:denkiteki-penpen.easystreet.com
java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.vmware.vim.VimBindingStub.retrieveServiceContent(VimBindingStub.java:19863)
at com.easystreet.vmware.testing.SimpleClient.connect(SimpleTest.java:55)
at com.easystreet.vmware.testing.SimpleClient.main(SimpleTest.java:217)
Caused by: java.net.SocketException: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
at javax.net.ssl.DefaultSSLSocketFactory.throwException(SSLSocketFactory.java:197)
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(SSLSocketFactory.java:210)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:92)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 12 more
Caused by: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)
at java.security.Provider$Service.newInstance(Provider.java:1263)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
at sun.security.jca.GetInstance.getInstance(GetInstance.java:165)
at javax.net.ssl.SSLContext.getInstance(SSLContext.java:143)
at javax.net.ssl.SSLContext.getDefault(SSLContext.java:86)
at javax.net.ssl.SSLSocketFactory.getDefault(SSLSocketFactory.java:120)
at org.apache.axis.components.net.JSSESocketFactory.initFactory(JSSESocketFactory.java:61)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:79)
... 15 more
Caused by: java.lang.NullPointerException
at java.io.Reader.<init>(Reader.java:79)
at java.io.InputStreamReader.<init>(InputStreamReader.java:73)
at sun.security.provider.CertBundleKeyStoreImpl.engineLoad(CertBundleKeyStoreImpl.java:142)
at java.security.KeyStore.load(KeyStore.java:1202)
at sun.security.ssl.TrustManagerFactoryImpl.getCacertsKeyStore(TrustManagerFactoryImpl.java:221)
at sun.security.ssl.DefaultSSLContextImpl.getDefaultTrustManager(DefaultSSLContextImpl.java:88)
at sun.security.ssl.DefaultSSLContextImpl.<init>(DefaultSSLContextImpl.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:539)
at java.lang.Class.newInstance0(Class.java:373)
at java.lang.Class.newInstance(Class.java:326)
at java.security.Provider$Service.newInstance(Provider.java:1239)
... 22 more
What does this indicate, and/or what am I missing? I'm using Fedora Eclipse 3.3.0 with IcedTea as the JVM.
I changed the path of "-Djavax.net.ssl.trustStore=" to use the full path without "~", and now I'm getting a "trustAnchors" exception. Any ideas?
Caught Exception : Name : org.apache.axis.AxisFault Message : ; nested exception is:
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty Trace :
AxisFault
faultCode: Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
faultActor:
faultNode:
faultDetail:
stackTrace:javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1541)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1508)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1491)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1084)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1061)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.vmware.vim.VimBindingStub.retrieveServiceContent(VimBindingStub.java:19863)
at com.easystreet.vmware.testing.SimpleClient.connect(SimpleTest.java:63)
at com.easystreet.vmware.testing.SimpleClient.main(SimpleTest.java:225)
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:76)
at sun.security.validator.Validator.getInstance(Validator.java:179)
at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:130)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:226)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:271)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:974)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:143)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:534)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:472)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:838)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1050)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1077)
... 17 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:201)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:121)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:105)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:74)
... 28 more
hostname:denkiteki-penpen.easystreet.com
javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:154)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at com.vmware.vim.VimBindingStub.retrieveServiceContent(VimBindingStub.java:19863)
at com.easystreet.vmware.testing.SimpleClient.connect(SimpleTest.java:63)
at com.easystreet.vmware.testing.SimpleClient.main(SimpleTest.java:225)
Caused by: javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1541)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1508)
at sun.security.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1491)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1084)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1061)
at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)
at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:191)
at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:404)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:138)
... 12 more
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:76)
at sun.security.validator.Validator.getInstance(Validator.java:179)
at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:130)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:226)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:271)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:974)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:143)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:534)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:472)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:838)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1050)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1077)
... 17 more
Caused by: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
at java.security.cert.PKIXParameters.setTrustAnchors(PKIXParameters.java:201)
at java.security.cert.PKIXParameters.<init>(PKIXParameters.java:121)
at java.security.cert.PKIXBuilderParameters.<init>(PKIXBuilderParameters.java:105)
at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:74)
... 28 more
Did you find answer to this?
I am also hitting the same issue, and tried few things based on people's responses on the net, but does not seem to be working?
Even I am facing the same issue. Please let me know if you come across any solution for the problem.
Following is the client setup you need to do on Linux machine,
Creating Java Applications or Running Java Samples (Linux)
The run.sh file is configured to use a certificate store located ~/vmware-certs/
vmware.keystore. To create this certificate store:
1. Create the ~/vmware-certs directory.
2. Make sure the Java SDK tools are in your path.
3. Change to the ~/vmware-certs directory.
4. Import a certificate.
a. Enter the keytool command.
keytool -import -file <certificate-filename>
-alias <server-name> -keystore vmware.keystore
For example:
keytool -import -file vc-server1.cer
-alias vc-server1 -keystore vmware.keystore
b. Enter a password for the keystore.
c. Enter yes to import the certificate.
5. Repeat the last step for each certificate you wish to import.
Once you complete above steps, while executing java sample you need to add -Djavax.net.ssl.trustStore option as below
exec $/bin/java -classpath $ "-Djavax.net.ssl.trustStore=/root/v
mware-certs/vmware.keystore" -Xmx1024M < Class Name>
Hi, have you ever got succesfully solve this issue? Nowadays getting common issues on vCD 9.7 version.