How about the case of running WireMock in the terminal with java -jar wiremock-standalone.jar? Shouldn't console logging be enabled?
Steps:
I downloaded the jar from: http://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-standalone/2.9.0/wiremock-standalone-2.9.0.jar
Run it and got the error:
Check my java version and upgrade to the latest, but no help: java upgrade, but no help
It looks to me that you're trying to start the specific class in a standalone manner. This won't work as WireMock depends on a lot of other classes/jars that are not part of this jar.
For this reason a seperate Stand alone version is released which can be downloaded here Maven Repository. Instructions on how to start this version can be found here WireMock userguide.
When starting the standalone version a standard error is shown that causes no functional issues:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
In order to remove this error download slf4j-nop-1.7.9.jar and place it in your class path. Alternatively put it next to your WireMock jar and adjust your command to this:
Windows example
java -cp "slf4j-nop-1.7.9.jar;wiremock-standalone-2.15.0.jar" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --port 9999 --global-response-templating
Mac example
java -cp "slf4j-nop-1.7.9.jar:wiremock-standalone-2.15.0.jar" com.github.tomakehurst.wiremock.standalone.WireMockServerRunner --port 9999 --global-response-templating
In your screenshot I see that you're running 2.9.0, whereas the current version is 2.15.0. I recommend upgrading wiremock to this version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With