Return-Path: Delivered-To: apmail-geronimo-activemq-dev-archive@www.apache.org Received: (qmail 23509 invoked from network); 2 May 2006 14:04:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 May 2006 14:04:23 -0000 Received: (qmail 63244 invoked by uid 500); 2 May 2006 13:55:10 -0000 Delivered-To: apmail-geronimo-activemq-dev-archive@geronimo.apache.org Received: (qmail 63118 invoked by uid 500); 2 May 2006 13:55:10 -0000 Mailing-List: contact activemq-dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-dev@geronimo.apache.org Received: (qmail 63084 invoked by uid 99); 2 May 2006 13:55:10 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2006 06:55:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 May 2006 06:55:09 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4747D71429F for ; Tue, 2 May 2006 13:54:38 +0000 (GMT) Message-ID: <4733364.1146578078284.JavaMail.jira@brutus> Date: Tue, 2 May 2006 13:54:38 +0000 (GMT+00:00) From: "matt hoffman (JIRA)" To: activemq-dev@geronimo.apache.org Subject: [jira] Created: (AMQ-704) ActiveIO compromises java.lang.System.properties MIME-Version: 1.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 ActiveIO compromises java.lang.System.properties ------------------------------------------------ Key: AMQ-704 URL: https://issues.apache.org/activemq/browse/AMQ-704 Project: ActiveMQ Type: Bug Environment: ActiveMQ 4.0RC2 (confirmed still around in the current ActiveIO SVN), Java 1.5 on Windows (but should be a problem anywhere). Reporter: matt hoffman Fix For: 4.0 RC2 When using the ActiveIO journal, it's putting a java.util.HashSet into the System.properties (using a properties.put() call that circumvents the normal System.putProperty() method, that only allows strings). This isn't allowed, according to java.util.Properties' contract, and therefore breaks other packages that rely on System.properties adhering to its contract. Most notably, it chokes Hibernate; however, anything that iterates through the System properties will fail after ActiveIO has compromised it with a non-String value. Honestly, I don't know why Properties doesn't allow non-String values, but oh well. From the java.lang.Properties docs: "Because Properties inherits from Hashtable, the put and putAll methods can be applied to a Properties object. Their use is strongly discouraged as they allow the caller to insert entries whose keys or values are not Strings. The setProperty method should be used instead. If the store or save method is called on a "compromised" Properties object that contains a non-String key or value, the call will fail." The call is being made in org.apache.activeio.journal.active.ControlFile; I suppose a hack could be created that stringifies the HashSet before placing it in the properties and recreates it before getting it out again; atlernately, a simple singleton or static set could be used. I'd be happy to implement either one, if you'd like. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira