X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Felk%2Fclient%2FPolicyElasticSearchController.java;fp=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Felk%2Fclient%2FPolicyElasticSearchController.java;h=e9c4af27ebaabd8b6dbbd3550c604644b4c6cd99;hb=7925630b5edc79119f29392edc6ddc84cf7c3757;hp=2f4dc59cfb16172d715805f0162a9ef79c5a8e2a;hpb=c53fa990ea27ec074859eb94bcb7ec6deaa2157b;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java index 2f4dc59cf..e9c4af27e 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/elk/client/PolicyElasticSearchController.java @@ -20,7 +20,9 @@ package org.onap.policy.pap.xacml.rest.elk.client; +import java.io.IOException; import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; import java.security.KeyManagementException; import java.security.NoSuchAlgorithmException; import java.security.cert.X509Certificate; @@ -91,7 +93,7 @@ public class PolicyElasticSearchController{ psGroupPolicy, safeRisk, safePolicyWarning } - public static final HashMap name2jsonPath = new HashMap() { + protected static final HashMap name2jsonPath = new HashMap() { private static final long serialVersionUID = 1L; }; @@ -327,12 +329,12 @@ public class PolicyElasticSearchController{ }catch(Exception e){ response.setStatus(HttpServletResponse.SC_BAD_REQUEST); response.addHeader("error", "Exception Occured While Performing Elastic Transaction"); - LOGGER.error("Exception Occured While Performing Elastic Transaction"+e.getMessage()); + LOGGER.error("Exception Occured While Performing Elastic Transaction"+e.getMessage(),e); } } @RequestMapping(value={"/searchDictionary"}, method={org.springframework.web.bind.annotation.RequestMethod.POST}) - public ModelAndView searchDictionary(HttpServletRequest request, HttpServletResponse response) throws Exception{ + public ModelAndView searchDictionary(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException, IOException { try{ PolicyIndexType config = PolicyIndexType.config; PolicyIndexType closedloop = PolicyIndexType.closedloop; @@ -450,6 +452,7 @@ public class PolicyElasticSearchController{ request.setCharacterEncoding("UTF-8"); PrintWriter out = response.getWriter(); out.write(e.getMessage()); + LOGGER.error(e); } return null; }