diff --git a/CHANGELOG.md b/CHANGELOG.md
index c7b37e9..415718b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 2.1.15
+- Endpoint /versions made more robust.
+
## 2.1.14
- Made changes to /generate end-point to improve efficiency how result of event generation is handled
diff --git a/pom.xml b/pom.xml
index 76c4add..f2cb743 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
- 2.1.14
+ 2.1.15
2.2.7
eiffel-remrem-generate
diff --git a/service/src/main/java/com/ericsson/eiffel/remrem/generate/controller/VersionService.java b/service/src/main/java/com/ericsson/eiffel/remrem/generate/controller/VersionService.java
index 7617d32..cfc2988 100644
--- a/service/src/main/java/com/ericsson/eiffel/remrem/generate/controller/VersionService.java
+++ b/service/src/main/java/com/ericsson/eiffel/remrem/generate/controller/VersionService.java
@@ -110,7 +110,17 @@ public Map> getMessagingVersions() {
*/
public Map getServiceVersion() {
String resourcesPath = this.getClass().getClassLoader().getResource("").getPath();
- String manifestPath = resourcesPath.substring(0, resourcesPath.lastIndexOf(WEB_INF)).concat(META_INF_MANIFEST_MF);
+ int indexWebInf = resourcesPath.lastIndexOf(WEB_INF);
+ if (indexWebInf == -1) {
+ // "WEB-INF" was not found in the path, strange...
+ log.error("Cannot find '" + WEB_INF + "' in the path '" + resourcesPath +
+ "'. Not loaded from a WAR file?");
+ serviceVersion.put(VERSION, "\"ERROR: " + META_INF_MANIFEST_MF +
+ " not found; was the service run from a WAR file?\"");
+ return serviceVersion;
+ }
+
+ String manifestPath = resourcesPath.substring(0, indexWebInf).concat(META_INF_MANIFEST_MF);
try {
Manifest manifest = new Manifest(new FileInputStream(manifestPath));
Attributes mainAttribs = manifest.getMainAttributes();