Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 71503 invoked from network); 8 Aug 2005 07:16:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2005 07:16:07 -0000 Received: (qmail 27179 invoked by uid 500); 8 Aug 2005 07:16:06 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 27127 invoked by uid 500); 8 Aug 2005 07:16:06 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 27113 invoked by uid 99); 8 Aug 2005 07:16:06 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 00:16:06 -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 [193.252.22.29] (HELO smtp2.wanadoo.fr) (193.252.22.29) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Aug 2005 00:15:55 -0700 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0206.wanadoo.fr (SMTP Server) with ESMTP id CFE1D1C001CD for ; Mon, 8 Aug 2005 09:16:02 +0200 (CEST) Received: from [192.168.0.20] (APh-Aug-102-2-1-32.w193-252.abo.wanadoo.fr [193.252.40.32]) by mwinf0206.wanadoo.fr (SMTP Server) with ESMTP id 937BC1C001C9 for ; Mon, 8 Aug 2005 09:16:02 +0200 (CEST) X-ME-UUID: 20050808071602604.937BC1C001C9@mwinf0206.wanadoo.fr Subject: Re: Storing binary data in 0.9.1 fails (or data given back from the directory is changed) From: Emmanuel Lecharny To: Apache Directory Developers List In-Reply-To: <42F66D37.3060203@bellsouth.net> References: <42F66A8B.7000104@labeo.de> <42F66D37.3060203@bellsouth.net> Content-Type: text/plain Organization: iktek Date: Mon, 08 Aug 2005 09:16:01 +0200 Message-Id: <1123485361.7027.10.camel@wkslx01.iktek.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) 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 Alex, hi Stefan On Sun, 2005-08-07 at 16:21 -0400, Alex Karasulu wrote: > Stefan Zoerner wrote: > > > Hi Alex! > > > > I changed my server.xml configuration, i.e. I added the attributes as > > described to the java.naming.ldap.attributes.binary list. > > Unfortunatly, it doesn't work, the binary data is still stored/read > > out wrong. I checked it with Softerra LDAP Administrator and added an > > inetOrgPerson entry with a jpegPhoto attribute. Photo was damaged. > > I also ran the test case I added to JIRA DIREVE-163, and it failed as > > well. > > > > Therefore there must be a problem within ApacheDS, or with my > > configuration skills. > > > Ok another bug to nip. Sorry it did not work out. I'll try to get some > time soon to figure out why this is not working. Thanks for sticking > through with it to the end. I've tested an AddRequest with a PDU which contains a jpegPhoto and a byte[] as its value, and I'm not sure that the org.apache.ldap.common.berlib.asn1.decoder.add.AddAttributeValueRule.finish() method does the right thing when creating a String with the bytes it get. the line before the last line is : ... // Add the attribute attrs.put( id, new String( octets ) ) ; ... and should be ... // Add the value attrs.put( id, octets ) ; ... If the bytes are above 128, you will just transform the bytes to a bad Value. I think that the value, as it is supposed to be an OctetString, should be stored directly without creating a new String. wdyt Alex ? Emmanuel > > Alex > --------------------------------------------------------------------------------------- > Wanadoo vous informe que cet e-mail a ete controle par l'anti-virus mail. > Aucun virus connu a ce jour par nos services n'a ete detecte. > > >