Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 41910 invoked from network); 7 Aug 2008 06:53:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2008 06:53:58 -0000 Received: (qmail 40661 invoked by uid 500); 7 Aug 2008 06:53:55 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 40600 invoked by uid 500); 7 Aug 2008 06:53:54 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 40589 invoked by uid 99); 7 Aug 2008 06:53:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2008 23:53:54 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2008 06:52:57 +0000 Received: from [195.227.30.148] (larix [195.227.30.148]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id m776jqNF007862 for ; Thu, 7 Aug 2008 08:45:54 +0200 (CEST) Message-ID: <489A9A20.9080802@kippdata.de> Date: Thu, 07 Aug 2008 08:45:52 +0200 From: Rainer Jung User-Agent: Thunderbird 2.0.0.6 (X11/20070802) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: catalina.sh bug when JULI is not used References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thank you for reporting the problem. I added you message to Bugilla: https://issues.apache.org/bugzilla/show_bug.cgi?id=45585 We were already thinking about your first two solutions, I missed the third one. We'll need to check how reliable that is (w.r.t. POSIX). I am a little in favor of "-Dnop" or something similar. Regards, Rainer Ian Ward Comfort wrote: > I believe commit 652629 (which appeared in 6.0.17) broke catalina.sh > startup when JULI is not used -- that is, when > $CATALINA_BASE/conf/logging.properties does not exist. If this file is > absent, LOGGING_CONFIG is not set. However the variable appears quoted > in the shell command to exec the JVM: > > "$_RUNJAVA" $JAVA_OPTS "$LOGGING_CONFIG" $CATALINA_OPTS ... > > Which introduces an empty argument when LOGGING_CONFIG is unset, and the > JVM interprets this empty argument as the class to be invoked. > > Three possible fixes are: > > * Set LOGGING_CONFIG to a harmless flag if JULI is not used. With my > Sun JVM, a plain -D is safe. I don't know how portable this is. It > isn't very pretty. > > * Maintain separate JVM invocations for the cases when LOGGING_CONFIG is > set and when it's unset. This involves more code duplication. The code > in question is already duplicated; I'm not sure whether that argues for > or against this strategy. > > * Use a one-item shell array with an @ subscript, which is immune to > word splitting when between double quotes but expands to nothing when > unpopulated. For example: > > LOGGING_CONFIG[0]="-Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties" > > > followed by: > > "$_RUNJAVA" $JAVA_OPTS "${LOGGING_CONFIG[@]}" $CATALINA_OPTS ... > > This method may be too clever. I think POSIX requires shell arrays but > being portable to true Bourne shell would require $@, which is already > being used. > > I'd be willing to write up a patch if any of these methods seem acceptable. > > -- > Ian Ward Comfort > System Administrator, Student Computing, Stanford University --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org