From 8548e911aada420674774dbd2f3643538c79e9e4 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 6 Jun 2017 06:18:27 +0530 Subject: [PATCH] Added an error message when gpl siddhi extension is not configured --- .../mgt/core/geo/service/GeoServcieManagerImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoServcieManagerImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoServcieManagerImpl.java index e693bae2d8..f176c18ede 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoServcieManagerImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/java/org/wso2/carbon/device/mgt/core/geo/service/GeoServcieManagerImpl.java @@ -227,7 +227,14 @@ public class GeoServcieManagerImpl implements GeoService { eventprocessorStub.deployExecutionPlan(parsedTemplate); } } else { - log.error("Execution plan validation failed: " + validationResponse); + if (validationResponse.startsWith( + "'within' is neither a function extension nor an aggregated attribute extension" + )) { + log.error("GPL Siddhi Geo Extension is not configured. Please execute maven script " + + "`siddhi-geo-extention-deployer.xml` in $IOT_HOME/analytics/scripts"); + } else { + log.error("Execution plan validation failed: " + validationResponse); + } throw new GeoServiceException( "Error occurred while " + action + " geo " + executionPlanType + " alert for " + identifier.getType() + " with id: " + identifier.getId()); @@ -235,13 +242,13 @@ public class GeoServcieManagerImpl implements GeoService { return true; } catch (AxisFault axisFault) { throw new GeoServiceException( - "Event processor admin service stub initialization failed while " + action + " geo alert '" + + "Event processor admin service initialization failed while " + action + " geo alert '" + executionPlanType + "' for " + identifier.getType() + " " + "device with id: " + identifier.getId(), axisFault ); } catch (IOException e) { throw new GeoServiceException( - "Event processor admin service stub invocation failed while " + action + " geo alert '" + + "Event processor admin service failed while " + action + " geo alert '" + executionPlanType + "' for " + identifier.getType() + " " + "device with id: " + identifier.getId(), e); } catch (JWTClientException e) {