question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoSuchMethodError: org.apache.http.conn.ssl.SSLSocketFactory

See original GitHub issue

I’m trying to mock a server and testing with robolectric but I’m getting this error. the complete stacktrace: If you want any extra info I could send it for you.

java.lang.NoSuchMethodError: org.apache.http.conn.ssl.SSLSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Lorg/apache/http/conn/ssl/X509HostnameVerifier;)V
    at com.github.tomakehurst.wiremock.http.HttpClientFactory.createSslSocketFactory(HttpClientFactory.java:110)
    at com.github.tomakehurst.wiremock.http.HttpClientFactory.createClientConnectionManagerWithSSLSettings(HttpClientFactory.java:88)
    at com.github.tomakehurst.wiremock.http.HttpClientFactory.createClient(HttpClientFactory.java:54)
    at com.github.tomakehurst.wiremock.http.HttpClientFactory.createClient(HttpClientFactory.java:70)
    at com.github.tomakehurst.wiremock.http.ProxyResponseRenderer.<init>(ProxyResponseRenderer.java:52)
    at com.github.tomakehurst.wiremock.WireMockServer.<init>(WireMockServer.java:94)
    at com.github.tomakehurst.wiremock.junit.WireMockRule$1.evaluate(WireMockRule.java:69)
    at org.junit.rules.RunRules.evaluate(RunRules.java:18)
    at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:250)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
    at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:177)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass(JUnitTestClassExecuter.java:86)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute(JUnitTestClassExecuter.java:49)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass(JUnitTestClassProcessor.java:69)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:48)
    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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    at org.gradle.messaging.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:105)
    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.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.messaging.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:355)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:695)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tomakehurstcommented, Jul 31, 2014

Over a month old, so assuming this is OK now.

0reactions
rodriamarocommented, Jun 28, 2014

I think its a OkHttp conflict, I’ll see it with more attention tomorrow

Read more comments on GitHub >

github_iconTop Results From Across the Web

NoSuchMethodError: org.apache.http.conn.ssl ...
Assuming your project is built with Maven, adding this to your pom.xml should take care of that issue:
Read more >
org.apache.http.conn.ssl.SSLConnectionSocketFactory · Issue ...
I was using version 1.10.0 but I had to upgrade in order to have this: s3client.setS3ClientOptions(S3ClientOptions.builder().
Read more >
java.lang.NoSuchMethodError: org.apache.http.conn.scheme ...
Hi, Could you please help me with a problem I'm having with Ektorp? I'm following the reference documentation, and I already have a...
Read more >
SSLConnectionSocketFactory (Apache HttpClient 4.5.12 API)
org.apache.http.conn.ssl ... SSLSocketFactory can be used to validate the identity of the HTTPS server against a list of trusted certificates and to ...
Read more >
Websphere HttpClient java.lang.NoSuchMethodError - iTecNote
NoSuchMethodError : org/apache/http/conn/ssl/SSLSocketFactory. apache-httpclient-4.xwebsphere. I have a webapp that needs to be deployed to Websphere 8.5, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found