Running standalone wiremock with custom extending

344 views
Skip to first unread message

kevi...@kooppi.com

unread,
Feb 21, 2016, 10:13:22 PM2/21/16
to wiremock-user

I am trying to run standalone wireMock with custom extension (downloaded as jar,https://github.com/opentable/wiremock-body-transformer).

CLI:
java -cp $jar path : wiremock-1.57-standalone.jar com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --extensions com.opentable.extension.BodyTransformer

Then I get this exception:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpRequest
at com.github.tomakehurst.wiremock.WireMockServer.(WireMockServer.java:98)
at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.run(WireMockServerRunner.java:62)
at com.github.tomakehurst.wiremock.standalone.WireMockServerRunner.main(WireMockServerRunner.java:110)
Caused by: java.lang.ClassNotFoundException: org.apache.http.HttpRequest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more

Where is the problem relies in? Thanks a lot in advance.

Tom Akehurst

unread,
Feb 22, 2016, 10:00:26 AM2/22/16
to wiremock-user
Hard to tell without knowing what else you have in your classpath, but I suspect you've somehow pulled the non-standalone wiremock jar in, plus another dependency with a different version of the Apache HTTP client.
Reply all
Reply to author
Forward
0 new messages