Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF6EF188C4 for ; Tue, 16 Jun 2015 09:14:02 +0000 (UTC) Received: (qmail 80497 invoked by uid 500); 16 Jun 2015 09:13:59 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 80437 invoked by uid 500); 16 Jun 2015 09:13:59 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 80425 invoked by uid 99); 16 Jun 2015 09:13:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Jun 2015 09:13:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id DBA3ADFB90; Tue, 16 Jun 2015 09:13:58 +0000 (UTC) From: DaanHoogland To: dev@cloudstack.apache.org Reply-To: dev@cloudstack.apache.org References: In-Reply-To: Subject: [GitHub] cloudstack pull request: Catch encoding exception Content-Type: text/plain Message-Id: <20150616091358.DBA3ADFB90@git1-us-west.apache.org> Date: Tue, 16 Jun 2015 09:13:58 +0000 (UTC) Github user DaanHoogland commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/464#discussion_r32503356 --- Diff: plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java --- @@ -2265,7 +2265,11 @@ public Answer forgetObject(ForgetObjectCmd cmd) { } private static String deriveTemplateUuidOnHost(VmwareHypervisorHost hyperHost, String storeIdentifier, String templateName) { - String templateUuid = UUID.nameUUIDFromBytes((templateName + "@" + storeIdentifier + "-" + hyperHost.getMor().getValue()).getBytes("UTF-8")).toString(); + try{ + String templateUuid = UUID.nameUUIDFromBytes((templateName + "@" + storeIdentifier + "-" + hyperHost.getMor().getValue()).getBytes("UTF-8")).toString(); + }catch(UnsupportedEncodingException e){ + s_logger.warn("Unable to generate UUID due to unexpected encoding error."+e); --- End diff -- and probably retry with Charset.defaultCharset(), no? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---