From fbff308a70959e129fbe5799a299579cd47cafaa Mon Sep 17 00:00:00 2001 From: crountre Date: Wed, 29 Jul 2020 11:55:29 -0500 Subject: [PATCH 1/2] Fix unicode logging conversion --- .../main/python/wlsdeploy/logging/platform_logger.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/src/main/python/wlsdeploy/logging/platform_logger.py b/core/src/main/python/wlsdeploy/logging/platform_logger.py index 7e5698cb73..d5a7d56b43 100644 --- a/core/src/main/python/wlsdeploy/logging/platform_logger.py +++ b/core/src/main/python/wlsdeploy/logging/platform_logger.py @@ -2,6 +2,7 @@ Copyright (c) 2017, 2019, Oracle Corporation and/or its affiliates. All rights reserved. Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. """ +import java.lang.Object as JObject import java.lang.System as JSystem import java.lang.Thread as JThread import java.lang.Throwable as Throwable @@ -286,6 +287,14 @@ def _get_args_as_java_array(*args): result = JArrayList() if args is not None and len(args) > 0: for arg in args: - result.add(str(arg)) + if arg is not None: + if isinstance(arg, unicode) or isinstance(arg, str): + result.add(arg) + elif isinstance(arg, JObject): + result.add(arg.toString()) + else: + result.add(unicode(arg)) + else: + result.add(str(arg)) return result.toArray() From d17ce22faa8ea14fcb929db932b783b5f7715a02 Mon Sep 17 00:00:00 2001 From: Richard Killen Date: Wed, 29 Jul 2020 16:10:12 -0500 Subject: [PATCH 2/2] Jira WDT-312 - Corrected exception type thrown by aliases --- core/src/main/python/wlsdeploy/tool/discover/discoverer.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/python/wlsdeploy/tool/discover/discoverer.py b/core/src/main/python/wlsdeploy/tool/discover/discoverer.py index 4b5e7e328c..fc994fd54c 100644 --- a/core/src/main/python/wlsdeploy/tool/discover/discoverer.py +++ b/core/src/main/python/wlsdeploy/tool/discover/discoverer.py @@ -8,7 +8,6 @@ from java.net import URISyntaxException from java.net import MalformedURLException -from oracle.weblogic.deploy.aliases import AliasException from oracle.weblogic.deploy.discover import DiscoverException from oracle.weblogic.deploy.util import PyOrderedDict as OrderedDict from oracle.weblogic.deploy.util import StringUtils @@ -157,7 +156,7 @@ def _add_to_dictionary(self, dictionary, location, wlst_param, wlst_value, wlst_ model_param, model_value = self._aliases.get_model_attribute_name_and_value(location, wlst_param, wlst_value) - except AliasException, de: + except DiscoverException, de: _logger.info('WLSDPLY-06106', wlst_param, wlst_path, de.getLocalizedMessage(), class_name=_class_name, method_name=_method_name) return @@ -668,7 +667,7 @@ def _get_wlst_attributes(self, location): wlst_attribute = self._aliases.get_wlst_attribute_name(location, model_attribute) if wlst_attribute: wlst_attributes.append(wlst_attribute) - except AliasException: + except DiscoverException: continue return wlst_attributes