Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 33008 invoked from network); 5 Sep 2008 17:39:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2008 17:39:35 -0000 Received: (qmail 95307 invoked by uid 500); 5 Sep 2008 17:39:33 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 95258 invoked by uid 500); 5 Sep 2008 17:39:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 95232 invoked by uid 99); 5 Sep 2008 17:39:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 10:39:32 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 17:38:43 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5B1B8234C1D4 for ; Fri, 5 Sep 2008 10:38:44 -0700 (PDT) Message-ID: <613898260.1220636324372.JavaMail.jira@brutus> Date: Fri, 5 Sep 2008 10:38:44 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3840) The test code executes java processes by just executing java instead of using a full path. This may cause the wrong java to be picked up. In-Reply-To: <1019721108.1218727906207.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3840?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden updated DERBY-3840: ---------------------------------- Attachment: DERBY-3840_diff2.txt Thanks for looking at the patch. Here is an updated patch with the javadoc. It does not appear that the com.ibm.oti.vm.exe property is read only. I can set it to something else on the command line and it will change. > The test code executes java processes by just executing java instead of using a full path. This may cause the wrong java to be picked up. > ----------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-3840 > URL: https://issues.apache.org/jira/browse/DERBY-3840 > Project: Derby > Issue Type: Bug > Components: Newcomer, Test > Affects Versions: 10.5.0.0 > Reporter: Kathey Marsden > Assignee: Kathey Marsden > Attachments: DERBY-3840_diff.txt, DERBY-3840_diff2.txt > > > There are places in the code where we execute a java process. e.g. BaseTestCase.assertExecJavaCmdAsExpected where we execcute a java process and just call "java". In windows at least the new shell created for the exec'ed process does not share the parent process path but rather picks up the path from the Windows System variables. This can cause the wrong java to be picked up. Also the method does not work for j9 because it calls "java" instead of the actual executable name. Perhaps we should have a method: > public static final String getJavaExecutableName() { > String vmname = getSystemProperty("com.ibm.oti.vm.exe"); > if (vmname == null) > vmname = getSystemProperty("java.home") + File.pathSeparator + "java"; > return vmname; > } > There are also issues with this in NetworkServerControlApiTest. NetworkServerTestSetup and the replication tests and maybe others as well. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.