diff --git a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java index d7a8e2077193..52f799f742f9 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java +++ b/components/apimgt/org.wso2.carbon.apimgt.persistence/src/main/java/org/wso2/carbon/apimgt/persistence/RegistryPersistenceImpl.java @@ -2751,7 +2751,7 @@ public Mediation getMediationPolicy(Organization org, String apiId, String media int prependIndex = apiPath.lastIndexOf("/api"); String apiResourcePath = apiPath.substring(0, prependIndex); String policyPath = GovernanceUtils.getArtifactPath(registry, mediationPolicyId); - if (!policyPath.startsWith(apiResourcePath)) { + if (!policyPath.toLowerCase().startsWith(apiResourcePath.toLowerCase())) { throw new MediationPolicyPersistenceException("Policy not foud ", ExceptionCodes.POLICY_NOT_FOUND); } Resource mediationResource = registry.get(policyPath);