Hi I am getting the following invalid liscence exception while calling a secured URL lets say “https://adcenter.microsoft.com/” from Apache Axis, i think this must also be the case with HTTPClient as well, i know we can generate a .keysotre with java tool and put that in server’s conf directory works but in this scenario i am invoking the code via main Method so .keystore kept in servers conf wont help , please suggest how to install a cerificate/Liscense for a secured url in java so that we run the code either under webserver environment or just by calling main method this should work
Exception in thread "main" com.dstc.security.util.licensing.InvalidLicense: Cannot load license for module jcsi.provider
at com.dstc.security.util.licensing.LicenseValidator.loadLicense(LicenseValidator.java:87)
at com.dstc.security.util.licensing.LicenseValidator.check(LicenseValidator.java:290)
at com.dstc.security.provider.symm.Licensed.<clinit>(Licensed.java:60)
at com.dstc.security.provider.symm.BlockCipher.<clinit>(BlockCipher.java:629)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at java.security.Provider$Service.newInstance(Provider.java:1221)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at com.sun.net.ssl.internal.ssl.CipherBox.<init>(CipherBox.java:82)
at com.sun.net.ssl.internal.ssl.CipherBox.newCipherBox(CipherBox.java:113)
at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:361)
at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:399)
at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:378)
at com.sun.net.ssl.internal.ssl.CipherSuite.isAvailable(CipherSuite.java:145)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.buildAvailableCache(CipherSuiteList.java:215)
at com.sun.net.ssl.internal.ssl.CipherSuiteList.getDefault(CipherSuiteList.java:239)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(SSLSocketImpl.java:520)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:358)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:71)
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: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)
This particular issue seems unrelated to Axis or HttpClient: the JRE is using an SSL provider which expects a valid license (i.e. you need to pay to use it). Did you intend to use the “Wedgetail JCSI components” as SSL provider for any particular reason (an old version of Java perhaps)?
If not, check your classpath. Maybe someone has added that JCSI JAR to it (it has a name like “jcsi_base.jar”) and forgot about it, or they forgot to include the “jcsi_license.jar” file.