Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 64773 invoked from network); 20 Aug 2006 23:37:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Aug 2006 23:37:18 -0000 Received: (qmail 55660 invoked by uid 500); 20 Aug 2006 23:37:15 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 55581 invoked by uid 500); 20 Aug 2006 23:37:15 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 55570 invoked by uid 99); 20 Aug 2006 23:37:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 16:37:15 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [204.127.200.85] (HELO sccrmhc15.comcast.net) (204.127.200.85) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Aug 2006 16:37:14 -0700 Received: from [192.168.0.101] (c-69-255-56-239.hsd1.md.comcast.net[69.255.56.239]) by comcast.net (sccrmhc15) with ESMTP id <2006082023365301500m6e8ve>; Sun, 20 Aug 2006 23:36:53 +0000 Message-ID: <44E8F216.5000803@apache.org> Date: Sun, 20 Aug 2006 19:36:54 -0400 From: Mark Thomas User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: commons-dev@jakarta.apache.org Subject: [beanutils] Webapp using commons-logging fails to start in Tomcat 4.1.x when beanutils 1.7.0 is used by Tomcat X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi, The most recent Tomcat 4 release upgraded from beanutils 1.6.1 to 1.7.0 and this introduced a conflict with commons-logging (see http://issues.apache.org/bugzilla/show_bug.cgi?id=40252). As the issues boils down to fun and games with containers and classloader hierarchies, this might not be a beanutils issue at all but given the issue became apparent after a change in beanutils this seems like the right place to start. Since this discussion revolves around changes in the beanutils code, I am posting this to the dev list. If it is felt the users list is more appropriate, I am happy to move this thread to that list instead. With beanutils 1.6.1 utility classes such as BeanUtils and ConvertUtils were static and hence the associated Log instances were also static. All these objects were created by the Tomcat common classloader and all was well. In beanutils 1.7.0 the BeanUtilsBean class was introduced as per-context-classloader pseudo singletons. Providing commons-logging is not present in the webapp classloader then all is well. As soon as commons-logging is present in the webapp classloader, when the per context classloader instance of ConvertUtilsBean creates a logger it uses the Log class from the webapp classloader which conflicts with that in the common classloader and "Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed." results. The only option for the webapp developer is not to include commons-logging but this does make for portable webapps - not all containers use commons-logging internally and a webapp may require this library. For now, my short-term solution is to revert to beanutils 1.6.1 for a TC4.1.33 release. Longer term, I wonder if the same sort of trick the OP for the above bug uses in webapps (see http://rbodkin.blogs.com/ron_bodkins_blog/2006/07/stupid_log_tric.html) could be used in beanutils. I would be happy to work on a patch in this direction if it was thought to be useful. However, I would value the insight of those more familiar with the beanutils code before starting since I don't want to waste time on a pointless exercise. Regards, Mark --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org