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 5E07AC43E for ; Sun, 10 Jun 2012 18:35:35 +0000 (UTC) Received: (qmail 30730 invoked by uid 500); 10 Jun 2012 18:35:31 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 30483 invoked by uid 500); 10 Jun 2012 18:35:31 -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 30474 invoked by uid 99); 10 Jun 2012 18:35:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jun 2012 18:35:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.210.45 as permitted sender) Received: from [209.85.210.45] (HELO mail-pz0-f45.google.com) (209.85.210.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Jun 2012 18:35:26 +0000 Received: by dadv2 with SMTP id v2so5074979dad.18 for ; Sun, 10 Jun 2012 11:35:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=KXn5qXF/xO5jiStfaUDorf6dEiapgVsUpE6FMNfRD0Y=; b=bmY+FNWuDYZ6fmFVXgrqc7M5GZyVDPUYYntFgNKaXGOlNA9pej1BKeFb+G0nzHdoTU jW4E/BHNbmtFVBrDq2mgwGX4nsssHNo1niHMzTC1LAYStDm0LN0Pj8wGxqeHjXQwJVzW PGDYSLcGKl0QdBest5K9ptl9gwauISuoMjacaGY0c1HSnAN/4IYy8D9emHOLojU4Hq8S 85GXAz11Nybj59sV/DJuNzSDGdAsztM0cfvJ4BwQNprYVHRu9/nCmN6znrdRH2uaFsaw 71lVOeXfmotoINqZfOfwrcN9TLmoggG7/csOTJW+7PG49cqPwVCZiGN0PduQfXaUmQRo 96hw== MIME-Version: 1.0 Received: by 10.68.202.130 with SMTP id ki2mr18526652pbc.52.1339353306165; Sun, 10 Jun 2012 11:35:06 -0700 (PDT) Received: by 10.68.194.8 with HTTP; Sun, 10 Jun 2012 11:35:06 -0700 (PDT) In-Reply-To: <4FD4B0EA.3070908@ice-sa.com> References: <4FD45FFA.4010701@ice-sa.com> <4FD481BD.20209@ice-sa.com> <4FD492E9.6040109@ice-sa.com> <4FD4B0EA.3070908@ice-sa.com> Date: Sun, 10 Jun 2012 22:35:06 +0400 Message-ID: Subject: Re: Tomcat 6 : Warnings at startup From: Konstantin Kolinko To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org 2012/6/10 Andr=E9 Warnier : > Konstantin Kolinko wrote: >> >> 2012/6/10 Andr=E9 Warnier : >>> >>> No tomcat 5.5 files have been copied to that system (apart from the >>> webapp). >>> Here is the complete (edited, comments removed) content of >>> tomcat6/conf/catalina.properties : >>> >>> (...) >>> >>> common.loader=3D${catalina.base}/lib,${catalina.base}/lib/*.jar,${catal= ina.home}/lib,${catalina.home}/lib/*.jar,/var/lib/tomcat6/common/classes,/v= ar/lib/tomcat6/common/*.jar >>> >>> server.loader=3D${catalina.home}/server/classes,${catalina.home}/server= /*.jar,/var/lib/tomcat6/server/classes,/var/lib/tomcat6/server/*.jar >>> >>> shared.loader=3D${catalina.home}/shared/classes,${catalina.home}/shared= /*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/*.jar >> >> >> The above fragment of catalina.properties explains the issue that you >> are observing. >> >> The "common.loader", "server.loader" and "shared.loader" values >> provide configuration for Common, Server and Shared classloader, as >> better documented in 5.5 (Tomcat 6 docs not mention Server and Shared >> ones, but they still do exist): >> >> http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html#Overview >> >> If you look at a fresh copy of Tomcat 6, the values would be: >> >> [[[ >> >> common.loader=3D${catalina.base}/lib,${catalina.base}/lib/*.jar,${catali= na.home}/lib,${catalina.home}/lib/*.jar >> server.loader=3D >> shared.loader=3D >> ]]] >> >> The ones that you have in your file are a mix of 5.5 and 6.0 values. >> >> ClassLoaderFactory.validateFile() method is called in turn for each >> value in each of the 3 *.loader options and checks that those values >> point to an existing place, which is a directory and is readable. >> >> In your case, >> >>> WARNING: Problem with directory [/usr/share/tomcat6/server/classes], >>> exists: [false], isDirectory: [false], canRead: [false] >> >> >> it looked for [/usr/share/tomcat6/server/classes] and warned you that >> the said directory does not exist. >> >> > > Thank you Konstantin for this very thorough explanation. > > So, it looks like my options to make the warnings disappear are > - either just create these directories (empty) in CATALINA_HOME > - or modify the tomcat6/conf/catalina.properties file to remove (direct o= r > indirect) references to /usr/share/tomcat6/server > > As it is now, the file comes from the Tomcat 6 Debian package; I did not > modify that file. The file is strange. I wonder whether other configuration files there have similar inconsistencies. The good side though is that this error is not fatal. It was intended more for folks trying to start Tomcat using different user and failing because of libraries not being readable. (that is why "canRead" value is included into the message). ;) > I would imagine that if the Debian package maintainer decided to modify t= he > standard file, he had some reason to do that. > > Based on your knowledge, do you have an idea as to why the Debian Tomcat = 6 > package maintainer may have considered it a good idea to modify the stand= ard > catalina.properties in the way that he did ? =A0Could it be to make upgra= des > tomcat 5.5 -> tomcat 6 easier ? > > (To me, there seems to be a curious mixture of "symbolic" > (${catalina.home}/*) and "hardwired" (/var/lib/tomcat6/*) references in t= he > Debian version of that file.) I can imagine that some odd packages (debs, rpms) were installing their libraries into those folders. Anyway - Placing 3rd party libraries into Common classloader without a good reason is usually a bad idea. It can result in odd dependencies and in PermGen memory leaks. - Are you using this Tomcat to run "your own" application or one provided by Debian folks? If it were my own I would like to make sure that there were none of unexpected libraries in those classloaders. Creating the mentioned folders has the only benefit that you can leave the original configuration file "as is". Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org