Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 108D910B3A for ; Thu, 1 Aug 2013 18:10:49 +0000 (UTC) Received: (qmail 98018 invoked by uid 500); 1 Aug 2013 18:10:45 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 97684 invoked by uid 500); 1 Aug 2013 18:10:44 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 97673 invoked by uid 99); 1 Aug 2013 18:10:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 18:10:43 +0000 X-ASF-Spam-Status: No, hits=0.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FROM_STARTS_WITH_NUMS,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of 1983-01-06@gmx.net designates 212.227.17.22 as permitted sender) Received: from [212.227.17.22] (HELO mout.gmx.net) (212.227.17.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2013 18:10:36 +0000 Received: from [192.168.1.4] ([93.219.88.133]) by mail.gmx.com (mrgmx003) with ESMTPSA (Nemesis) id 0MS5QA-1Ubqxx3l3C-00THCM for ; Thu, 01 Aug 2013 20:10:16 +0200 Message-ID: <51FAA486.1030108@gmx.net> Date: Thu, 01 Aug 2013 20:10:14 +0200 From: Michael-O <1983-01-06@gmx.net> User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Cannot start apache tomcat 7.0 if server path contains two consecutive spaces. References: <51F89C71.1050302@exoplatform.com> <51F948F5.7050402@ice-sa.com> <7215BA462D00D343B2837F9113F0131F01819F25E4@POSTOFFICE02.polydyne.com> In-Reply-To: <7215BA462D00D343B2837F9113F0131F01819F25E4@POSTOFFICE02.polydyne.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K0:Z8YghKbT7niSYmILIS9iUf9ihkGYfCIIaDbWD9EHmYrnkKtjHhb UwZDSobj+8uPv1LOusZAPZxptunkNc3fka7ynRNsl+CS8+T6MJt2CDR0ZwZLhWgE3ToSLy5 HZ77EpoK7BT/Y8nc6F5kJ07c/ogkcxdy/BU9ErTdV/6AhahGG7b5aipWj9hXPPG/rRqej5n 0s/p9GoP8fz5Pc4ey4dew== X-Virus-Checked: Checked by ClamAV on apache.org Am 2013-08-01 15:41, schrieb Jeffrey Janner: >> -----Original Message----- >> From: Andr=E9 Warnier [mailto:aw@ice-sa.com] >> Sent: Wednesday, July 31, 2013 12:27 PM >> To: Tomcat Users List >> Subject: Re: Cannot start apache tomcat 7.0 if server path contains tw= o >> consecutive spaces. >> >> TRAN Trung Thanh wrote: >>> Hi all, >>> I am newbie here. >>> Today, I tried to start apache tomcat 7.0.42 in Linux environment. >>> Server path contains two consecutive spaces. When I run ./catalina.sh= >>> run, server cannot start and there is the following exception in >>> console >>> >>> ./catalina.sh run >>> Using CATALINA_BASE: /home/example/twoconsecutive spaces >>> Using CATALINA_HOME: /home/example/twoconsecutive spaces >>> Using CATALINA_TMPDIR: /home/example/twoconsecutive spaces/temp >>> Using JRE_HOME: /home/example/java/jdk1.6 >>> Using CLASSPATH: /home/example/twoconsecutive >>> spaces/bin/bootstrap.jar:/home/example/twoconsecutive >>> spaces/bin/tomcat-juli.jar >>> Exception in thread "main" java.lang.NoClassDefFoundError: >>> org/apache/catalina/startup/Bootstrap >>> Caused by: java.lang.ClassNotFoundException: >>> org.apache.catalina.startup.Bootstrap >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:202) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:190) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:306) >>> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)= >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:247) >>> Could not find the main class: org.apache.catalina.startup.Bootstrap.= >>> Program will exit. >>> >>> Tomcat server can start if server path does not contain consecutive >> space. >>> >>> Do anyone face to the same issue with me in this case? Have you any >>> suggestion to fix this issue? >> >> Yes : don't do that (using spaces in paths). >> >> It is quite important for my deployment. >>> >> >> That's a pity. >> Spaces in paths (and filenames) are evil, and should never have been >> allowed in the first place. A special place in hell is reserved for >> the genius who first allowed this stupid thing in an OS. I wish I had= >> 0.1 cent for every programming hour lost because of this. >> >> Technically, you can certainly find the correct way to quote them in >> any particular place and environment. But usually, this is merely >> moving the problem to some other place further down the line, where it= >> is even less visible and harder to find the bugs. >> I suppose the same could be said about any non-visible character, but >> spaces (along with >> TAB) are specially evil because in most environments, they are >> considered either as valid separators between words/tokens or as "non-= >> significant". >> >> My serious recommendation would be to think really hard about a way to= >> nip this in the bud, and avoid allowing them and using them in the >> first place. >> Think that if you allow them somewhere, and even if you quote them >> correctly there, you will have to continue quoting them (appropriately= ) >> everywhere else that you are using the corresponding strings. It is >> almost guaranteed that this will bite you somewhere. >> >> > > Agree with everything Andre says here. Even under Windows, where the OS= seems to handle it fine, as long as you're in the GUI, it is a problem. = You have to remember to quote the path everytime you want to use it at t= he command line level, or in PowerShell, etc. > It is really easier to remember that if you want the look of a space, b= ut need a non-printable character, to just use the underbar. How much ea= sier things could be if instead of "My Documents" you could write My_Docu= ments. Still looks like two words but it is only one. > As long as you have control over the naming, you should follow this adv= ise. > Jeff I guess for that reason Microsoft has replaced the C:\Documents and=20 Settings folder. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org