From fb79f7aa356ef2e4507cac5d5a328f789617cd5a Mon Sep 17 00:00:00 2001 From: Jorge Hernandez Date: Thu, 31 Aug 2017 00:09:45 -0500 Subject: Support Utils Libraries for CL Lab Integration There is a companion review in the drools-applications repo. This also includes workarounds to the recent oparent dependency introduction that breaks runtime (with the version-check-maven-plugin). It manifested by loading control loops and failing to load some classes due to different versions (in a lab environment). The issue was that underlying drools libraries use 3.2.5 and oparent has included a had dependency with transitive dependencies for some maven libraries in 3.2.3 and lower version xml parsers. Bottomoline, the classpath at runtime was formed by the union of both, with some libraries being resolved to the oparent one, and others to the drools one. These errors are very obscured to debug. Additional clean up of dependencies versions and order of build was introduced to avoid issues loading dependencies at runtime in a lab environment (non-junit).. Change-Id: If4f4201e08f7e6e1f3619f557434c1b2e23e47a5 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez --- .../org/onap/policy/drools/server/restful/RestManager.java | 3 +++ .../java/org/onap/policy/drools/system/PolicyEngine.java | 4 ++-- policy-management/src/main/server/config/system.properties | 12 ++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'policy-management/src/main') diff --git a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java index d877f1e9..379ca6a2 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java +++ b/policy-management/src/main/java/org/onap/policy/drools/server/restful/RestManager.java @@ -2299,6 +2299,7 @@ public class RestManager { @GET @Path("engine/tools/loggers/{logger}") + @Produces(MediaType.TEXT_PLAIN) @ApiOperation( value="logging level of a logger" ) @@ -2326,6 +2327,8 @@ public class RestManager { @PUT @Path("engine/tools/loggers/{logger}/{level}") + @Produces(MediaType.TEXT_PLAIN) + @Consumes(MediaType.TEXT_PLAIN) @ApiOperation( value="sets the logger level", notes="Please use the SLF4J logger levels" diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java index d7e0ecdd..bfda2450 100644 --- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java +++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java @@ -429,11 +429,11 @@ class PolicyEngineManager implements PolicyEngine { defaultConfig.put(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + TELEMETRY_SERVER_DEFAULT_NAME + PolicyProperties.PROPERTY_HTTP_SWAGGER_SUFFIX, - true); + "" + Boolean.TRUE); defaultConfig.put(PolicyProperties.PROPERTY_HTTP_SERVER_SERVICES + "." + TELEMETRY_SERVER_DEFAULT_NAME + PolicyProperties.PROPERTY_MANAGED_SUFFIX, - false); + "" + Boolean.FALSE); return defaultConfig; } diff --git a/policy-management/src/main/server/config/system.properties b/policy-management/src/main/server/config/system.properties index 6456ef53..a968b103 100644 --- a/policy-management/src/main/server/config/system.properties +++ b/policy-management/src/main/server/config/system.properties @@ -22,17 +22,17 @@ # jmx -com.sun.management.jmxremote.port = 9991 -com.sun.management.jmxremote.authenticate = false -com.sun.management.jmxremote.ssl = false +com.sun.management.jmxremote.port=9991 +com.sun.management.jmxremote.authenticate=false +com.sun.management.jmxremote.ssl=false # certs javax.net.ssl.keyStore=/opt/app/policy/etc/ssl/policy-keystore -javax.net.ssl.keyStorePassword = ${{KEYSTORE_PASSWD}} +javax.net.ssl.keyStorePassword=${{KEYSTORE_PASSWD}} javax.net.ssl.trustStore=/opt/app/policy/etc/ssl/policy-keystore -javax.net.ssl.trustStorePassword = ${{KEYSTORE_PASSWD}} +javax.net.ssl.trustStorePassword=${{KEYSTORE_PASSWD}} # standard logging -logback.configurationFile=config/logback.xml \ No newline at end of file +logback.configurationFile=config/logback.xml -- cgit 1.2.3-korg