Hello,
I'm attempting to ignore the SSL certificate in a Java application as follows:
System.setProperty(
"org.apache.axis.components.net.SecureSocketFactory",
"org.apache.axis.components.net.SunFakeTrustSocketFactory"
);
I'm getting the following error at runtime:
Exception in thread "main" java.lang.NoClassDefFoundError: sun.security.provider.Sun
at java.lang.J9VMInternals.verifyImpl(
Native Method)
at java.lang.J9VMInternals.verify(
J9VMInternals.java:72)
at java.lang.J9VMInternals.verify(
J9VMInternals.java:70)
at java.lang.J9VMInternals.initialize(
J9VMInternals.java:134)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(
Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:44)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(
Constructor.java:516)
at org.apache.commons.discovery.tools.ClassUtils.newInstance(
ClassUtils.java:160)
at org.apache.axis.AxisProperties$1.run(
AxisProperties.java:183)
at java.security.AccessController.doPrivileged(
AccessController.java:202)
at org.apache.axis.AxisProperties.newInstance(
AxisProperties.java:166)
at org.apache.axis.components.net.SocketFactoryFactory.getFactory(
SocketFactoryFactory.java:75)
at org.apache.axis.transport.http.HTTPSender.getSocket(
HTTPSender.java:187)
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:2784)
at org.apache.axis.client.Call.invoke(
Call.java:2767)
at org.apache.axis.client.Call.invoke(
Call.java:2443)
at org.apache.axis.client.Call.invoke(
Call.java:2366)
at org.apache.axis.client.Call.invoke(
Call.java:1812)
at com.vmware.vim25.VimBindingStub.retrieveServiceContent(
VimBindingStub.java:47221)
at vim.samples.ws.HelloVI.main(
HelloVI.java:64)
Caused by:
java.lang.ClassNotFoundException: sun.security.provider.Sun
at java.lang.Throwable.<init>(
Throwable.java:80)
at java.lang.ClassNotFoundException.<init>(
ClassNotFoundException.java:77)
at java.net.URLClassLoader.findClass(
URLClassLoader.java:385)
at java.lang.ClassLoader.loadClass(
ClassLoader.java:653)
at sun.misc.Launcher$AppClassLoader.loadClass(
Launcher.java:346)
at java.lang.ClassLoader.loadClass(
ClassLoader.java:619)
... 27 more
Any ideas on how to fix this - thanks!