Dan Li
02/08/2024, 11:59 PM./extensions/
directory.
2. Running the following:
docker run -it --rm \
-p 8080:8080 \
--name wiremock \
-v "${PWD}/extensions:/var/wiremock/extensions" \
wiremock/wiremock:3.3.1 \
--extensions "org.wiremock.grpc.GrpcExtensionFactory"
However, this results in the error:
Exception in thread "main" java.lang.ClassCastException: class org.wiremock.grpc.GrpcExtensionFactory cannot be cast to class com.github.tomakehurst.wiremock.extension.Extension (org.wiremock.grpc.GrpcExtensionFactory and com.github.tomakehurst.wiremock.extension.Extension are in unnamed module of loader 'app')
Inspecting the `GrpcExtensionFactory` class, I see that it doesn’t extend Extension
, but instead extends ExtensionFactory
and creates Extension
instances. Here’s where I hit a wall though, because I can’t find any documentation that explains how to run WireMock with `ExtensionFactory`s.
Can someone shed some light for me?Tom
02/09/2024, 5:30 PM--extensions
parameter at all as this will attempt to double load the extension.Tom
02/09/2024, 5:42 PM