java.lang.Exception: Unexpected exception, expected<org.apache.http.conn.HttpHostConnectException> but was<org.apache.http.conn.ConnectTimeoutException>

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via hc-dev by ant elder, 1 year ago
Unexpected exception, expected<org.apache.http.conn.HttpHostConnectException> but was<org.apache.http.conn.ConnectTimeoutException>
via GitHub by petur
, 1 year ago
Unexpected exception, expected<java.lang.UnsupportedOperationException> but was<java.lang.AssertionError>
via GitHub by petur
, 1 year ago
Unexpected exception, expected<java.lang.UnsupportedOperationException> but was<java.lang.AssertionError>
via GitHub by petur
, 1 year ago
Unexpected exception, expected<java.lang.UnsupportedOperationException> but was<org.junit.internal.AssumptionViolatedException>
via GitHub by Mikemosca
, 1 year ago
Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.NullPointerException>
via GitHub by Mikemosca
, 1 year ago
Unexpected exception, expected<java.lang.IllegalArgumentException> but was<java.lang.RuntimeException>
java.lang.Exception: Unexpected exception, expected&lt;org.apache.http.conn.HttpHostConnectException&gt; but was&lt;org.apache.http.conn.ConnectTimeoutException&gt;
at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:122)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:562)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732)
at org.apache.http.impl.client.TestRequestRetryHandler.assertOnRetry(TestRequestRetryHandler.java:103)
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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:21)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)

Users with the same issue

Once, 2 hours ago
48 times, 4 weeks ago
2 times, 1 month ago
2 times, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.