Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 670F9D300 for ; Wed, 17 Oct 2012 19:58:04 +0000 (UTC) Received: (qmail 58238 invoked by uid 500); 17 Oct 2012 19:58:04 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 58180 invoked by uid 500); 17 Oct 2012 19:58:04 -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 57974 invoked by uid 99); 17 Oct 2012 19:58:04 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 19:58:04 +0000 Date: Wed, 17 Oct 2012 19:58:03 +0000 (UTC) From: "Allen Zhao (JIRA)" To: dev@directory.apache.org Message-ID: <1405378260.59885.1350503884036.JavaMail.jiratomcat@arcas> In-Reply-To: <1233044184.58419.1350491044993.JavaMail.jiratomcat@arcas> Subject: [jira] [Comment Edited] (DIRSHARED-139) LdifReader missing attributes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSHARED-139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13478205#comment-13478205 ] Allen Zhao edited comment on DIRSHARED-139 at 10/17/12 7:56 PM: ---------------------------------------------------------------- Here is what I found. Not sure this is the design or bug. The the later attribute has incompatible value type, it will be ignored. (note, myconfigstringvalue is a java object, should support both binary and string) org.apache.directory.shared.ldap.model.entry.DefaultAttribute Line: 1140 if ( !isHR ) { Line: 1167 // We can't add Binary values into a String Attribute LOG.info( I18n.err( I18n.ERR_04451 ) ); So the following entry pass the test.But all myconfigstringvalue base64 encoded. dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration cn: DeviceTypes javaClassName: java.lang.String myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg== myconfigstringvalue: P:Phone (except BlackBerry) myconfigstringvalue: 3:Internet only device objectClass: top objectClass: javaobject objectClass: myconfigstringvaluedobject was (Author: allen.zhao@telus.com): Here is what I found. Not sure this is the design or bug. The the later attribute has incompatible value type, it will be ignored. (note, myconfigstringvalue is a java object, should support both binary and string) org.apache.directory.shared.ldap.model.entry.DefaultAttribute Line: 1140 if ( !isHR ) { Line: 1167 // We can't add Binary values into a String Attribute LOG.info( I18n.err( I18n.ERR_04451 ) ); So the following entry pass the test. dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration cn: DeviceTypes javaClassName: java.lang.String myconfigstringvalue: P:Phone (except BlackBerry) myconfigstringvalue: 3:Internet only device myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg== objectClass: top objectClass: javaobject objectClass: myconfigstringvaluedobject > LdifReader missing attributes > ----------------------------- > > Key: DIRSHARED-139 > URL: https://issues.apache.org/jira/browse/DIRSHARED-139 > Project: Directory Shared > Issue Type: Bug > Affects Versions: 1.0.0-M12 > Environment: Linux > Reporter: Allen Zhao > > $ cat t.ldif > dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration > cn: DeviceTypes > javaClassName: java.lang.String > myconfigstringvalue: P:Phone (except BlackBerry) > myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg== > myconfigstringvalue: 3:Internet only device > objectClass: top > objectClass: javaobject > objectClass: myconfigstringvaluedobject > Code: > LdifReader lr = new LdifReader(fileName); > while (lr.hasNext()) { > LdifEntry e = lr.next(); > System.out.println(e.toString()); > } > The attribute "myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg==" missed. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira