问题
I have installed my application and restarted in WAS 8.5, I see below exception in SystemOut.log,where as it works fine in WAS 7.
java.lang.NoSuchMethodError: org/apache/http/conn/ssl/SSLSocketFactory.<init>(Ljava/lang/String;Ljava/security/KeyStore;Ljava/lang/String;Ljava/security/KeyStore;Ljava/security/SecureRandom;Lorg/apache/http/conn/ssl/X509HostnameVerifier;)V
Can any one help me how to resolve this issue?
回答1:
I'd guess you're deploying and trying to use one version of Apache HttpClient, but that WebSphere has a different version included in its libraries. If you could use the WebSphere-included version, that would be simplest, but if you need to use the specific version, you could change the WebSphere classloader policy to PARENT_LAST.
回答2:
websphere8 /WebSphere/AppServer/plugins/com.ibm.ws.prereq.jaxrs.jar has packages org.http.* com.ibm.ws.prereq.jaxrs.jar and HttpClient.jar conflict!
Change classloaders order invalid because com.ibm.ws.prereq.jaxrs.jar has been loaded when websphere start!
you can change HttpClient packages from org.http.* to net.test.* to avoid conflict
ps: http://www.ibm.com/developerworks/cn/websphere/library/techarticles/1108_jiangwk_classloader/1108_jiangwk_classloader.html
来源:https://stackoverflow.com/questions/13604272/java-lang-nosuchmethoderror-org-apache-http-conn-ssl-sslsocketfactory