jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1792359 - in /jmeter/trunk: src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java xdocs/changes.xml
Date Sun, 23 Apr 2017 12:13:58 GMT
Author: milamber
Date: Sun Apr 23 12:13:58 2017
New Revision: 1792359

URL: http://svn.apache.org/viewvc?rev=1792359&view=rev
Log:
Cannot run program "keytool": CreateProcess error=2 when starting JMeter 3.2 in gui mode
Change level (from ERROR to INFO) of the exception message when JMeter try to find the keytool
util from PATH env var. It's not a error because JMeter try to find keytool with several ways.
Little code format to allow better code review.
Bugzilla Id: 61026

Modified:
    jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java?rev=1792359&r1=1792358&r2=1792359&view=diff
==============================================================================
--- jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java (original)
+++ jmeter/trunk/src/jorphan/org/apache/jorphan/exec/KeyToolUtils.java Sun Apr 23 12:13:58
2017
@@ -84,9 +84,9 @@ public class KeyToolUtils {
 
         String keytoolPath; // work field
         if (keytoolDir != null) {
-            keytoolPath = new File(new File(keytoolDir),KEYTOOL).getPath();
-        if (!checkKeytool(keytoolPath)) {
-                log.error("Cannot find keytool using property " + KEYTOOL_DIRECTORY + "="+keytoolDir);
+            keytoolPath = new File(new File(keytoolDir), KEYTOOL).getPath();
+            if (!checkKeytool(keytoolPath)) {
+                log.error("Cannot find keytool using property " + KEYTOOL_DIRECTORY + "="
+ keytoolDir);
                 keytoolPath = null; // don't try anything else if the property is provided
             }
         } else {
@@ -94,7 +94,7 @@ public class KeyToolUtils {
             if (!checkKeytool(keytoolPath)) { // Not found on PATH, check Java Home
                 File javaHome = SystemUtils.getJavaHome();
                 if (javaHome != null) {
-                    keytoolPath = new File(new File(javaHome,"bin"),KEYTOOL).getPath(); //
$NON-NLS-1$
+                    keytoolPath = new File(new File(javaHome, "bin"), KEYTOOL).getPath();
// $NON-NLS-1$
                     if (!checkKeytool(keytoolPath)) {
                         keytoolPath = null;
                     }
@@ -444,7 +444,8 @@ public class KeyToolUtils {
              */
             return status == 0 || status == 1; // TODO this is rather fragile
         } catch (IOException ioe) {
-            log.error("Exception checking for keytool existence, will return false", ioe);
+            log.info("Exception checking for keytool existence, will return false, try another
way.");
+            log.debug("Exception is: ", ioe);
             return false;
         } catch (InterruptedException e) { // NOSONAR
             log.error("Command was interrupted\n" + nativeCommand.getOutResult(), e);

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1792359&r1=1792358&r2=1792359&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sun Apr 23 12:13:58 2017
@@ -165,6 +165,7 @@ Summary
 <ul>
     <li><bug>60994</bug>Fix some typo in comments or log messages. <pr>289</pr>
and <pr>290</pr></li>
     <li><bug>61011</bug>Replace occurrences count is not correct (Path
and Host replacement are counted twice)</li>
+    <li><bug>61026</bug>Cannot run program "keytool": CreateProcess error=2
when starting JMeter 3.2 in gui mode</li>
 </ul>
 
  <!--  =================== Thanks =================== -->
@@ -174,6 +175,7 @@ Summary
 </p>
 <ul>
 <li>Anass Benomar (abenomar at umanis.com, Mithrandir0407 @ github)</li>
+<li>Anthony Kearns (anthony.kearns atrightside.co)</li>
 </ul>
 <p>We also thank bug reporters who helped us improve JMeter. <br/>
 For this release we want to give special thanks to the following reporters for the clear
reports and tests made after our fixes:</p>



Mime
View raw message