Closed otrosien closed 8 years ago
Blocker: Seems like 2.1.0 removed the JsonFileMappingsLoader. Need to clarify with @tomakehurst what to use instead.
Ok, found commit in wiremock (https://github.com/tomakehurst/wiremock/commit/a093d20ddc15cb6d1f9871d06d2878c7839a7058), so supposedly I need to use JsonFileMappingsSource
directly.
Yes, that's the one you probably want to use going forward.
Thanks! Closed via f3b2293
Unfortunately this causes a NPE.
Problem is line 85 of JsonFileMappingsSource. getUri().getPath() returns null for a resource that is not in a resource folder, but coming from inside a jar file. I'll open a ticket in the wiremock project.
mappingFile.getUri().getPath().replace(mappingsFileSource.getUri().getPath(), "");
Stacktrace:
java.lang.NullPointerException
at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.getFileName(JsonFileMappingsSource.java:85)
at com.github.tomakehurst.wiremock.standalone.JsonFileMappingsSource.loadMappingsInto(JsonFileMappingsSource.java:72)
at com.github.tomakehurst.wiremock.core.WireMockApp.loadMappingsUsing(WireMockApp.java:87)
at com.github.tomakehurst.wiremock.core.WireMockApp.loadDefaultMappings(WireMockApp.java:83)
..
Closed via e4af636
Upgrade to 2.1.0-beta