"Resources can not be found." - generating routes with local Java implementation

Kia ora,

I can generate routes between any two points (mostly) fine when I use the ORS codebase independently. However, I have now merged the ORS codebase with my larger simulation. I have the following file structure:

         ... // the full ORS library
         openrouteservice // this folder is marked as a Java module

I can correctly request distance matrices, however when I request routes, I get the following error:

Resources can not be found.
	at org.heigit.ors.api.requests.routing.RouteRequest.generateRouteFromRequest(RouteRequest.java:623)
	at gphhemd.definitions.instance.ORSGraph.getShortestPath(ORSGraph.java:82)
	at gphhemd.definitions.instance.tests.ORS_TestRoute.main(ORS_TestRoute.java:23)
java.lang.IllegalStateException: Your route request failed: from {-41.221002, 174.807571} to {-41.229141, 174.880233} error: null
	at gphhemd.definitions.instance.ORSGraph.getShortestPath(ORSGraph.java:98)
	at gphhemd.definitions.instance.tests.ORS_TestRoute.main(ORS_TestRoute.java:23)

The “Resources can not be found.” is from an exception rooted from the loadLocalizations() method of the LocalizationManager class. I believe the error sits with the default value of the hardcoded resourcePattern variable, given my adjusted file structure.

I’ve messed with it for a few hours, but can’t seem to debug efficiently. Any help greatly valued.

Appreciate how much help the community is providing me, at the moment.

Ngā mihi,

Further debugging: I’ve replicated the PathMatchingResourcePatternResolver class and note that ORS adequately finds the libraries folder in the same folder as src (mentioned above). It identifies a .jar file in this directory that is unrelated to ORS.