Create Socket Error comes while using Custom
--------------------------------------------

                 Key: HTTPCLIENT-913
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-913
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.0.1
         Environment: window,oracle weblogic server 10.3 ,jdk 1.6.0
            Reporter: gaurav mishra


Iam using HTTPClient 4.0 to connect a client webservice using HTTPS.I'm having 
client provided certificate in .pfx format.
Following is my code
Step 1: setting system properties
System.setProperty("javax.net.ssl.keyStoreType", "PKCS12");
System.setProperty("javax.net.ssl.keyStore", 
"C:/bea/103/user_projects/domains/base_domain/qpass.pfx");
System.setProperty("javax.net.ssl.keyStorePassword","abc123");

Step2: I'm using CustomSSLProtocolSocketFactory for https
if(url.getProtocol().equals("https")) {
           Protocol customHttpsProtocol =
                  new Protocol("https", new 
CustomSSLProtocolSocketFactory(false), 443);
           Protocol.registerProtocol("https", customHttpsProtocol);           
           hostConfiguration.setHost(url.getHost(),url.getPort(), 
customHttpsProtocol);
}
Step 3: Calling the http client exceute method 
httpClient.setHostConfiguration(hostConfiguration);
statusCode = httpClient.executeMethod(postMethod);

This code works fine and i'm able to get the client response .
but actual problem is when i deploy my same code to another  machine .It gives 
me following error

java.lang.AbstractMethodError: createSocket
        at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:706)
        at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:386)
        at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
        at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324)
        at com.truelink.common.util.HttpUtil.send(HttpUtil.java:95)
        at com.truelink.common.util.HttpUtil.sendSoap(HttpUtil.java:45)
        at 
com.truelink.common.util.SOAPClient.executeWebServiceMethod(SOAPClient.java:71)
        at 
com.tcmobile.qpassdataexchange.QpassDataExchangeImpl.subscribe(QpassDataExchangeImpl.java:232)
        at 
com.tcmobile.qpassdataexchange.session.QpassDataExchangeSB.subscribe(QpassDataExchangeSB.java:175)
        at 
com.tcmobile.qpassdataexchange.session.QpassDataExchangeSB_c71gzk_EOImpl.subscribe(QpassDataExchangeSB_c71gzk_EOImpl.java:62)
        at 
com.tcmobile.qpassdataexchange.session.QpassDataExchangeSB_c71gzk_EOImpl_CBV.subscribe(Unknown
 Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
org.springframework.remoting.rmi.RmiClientInterceptorUtils.doInvoke(RmiClientInterceptorUtils.java:103)
        at 
org.springframework.ejb.access.SimpleRemoteSlsbInvokerInterceptor.doInvoke(SimpleRemoteSlsbInvokerInterceptor.java:75)
        at 
org.springframework.ejb.access.AbstractRemoteSlsbInvokerInterceptor.invoke(AbstractRemoteSlsbInvokerInterceptor.java:114)
        at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
        at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:174)
        at $Proxy87.subscribe(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
com.truelink.common.serviceproxy.ServicesLocator$ServiceInvocationHandler.invoke(ServicesLocator.java:237)
        at $Proxy87.subscribe(Unknown Source)
        at 
com.tcmobile.qpassdataexchange.ws.QpassDataExchangeWS.subscribe(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at 
weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:112)
        at 
weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:84)
        at 
weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:141)
        at 
weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:118)
        at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
        at 
weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
        at 
weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:45)
        at 
weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:286)
        at 
weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
        at 
weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at 
weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at 
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
        at 
weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:176)
        at 
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3501)
        at 
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(Unknown Source)
        at 
weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
        at 
weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
        at 
weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

I have checked all the configuration files in other machines all are same but 
this code is not runniing in any other machine.

Please let me know if any one already face this kind of issue.

Please help me to figure out what i'm missing ??









-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to