Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 69752 invoked from network); 22 Mar 2008 11:19:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2008 11:19:25 -0000 Received: (qmail 37601 invoked by uid 500); 22 Mar 2008 11:19:23 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 37552 invoked by uid 500); 22 Mar 2008 11:19:22 -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 37540 invoked by uid 99); 22 Mar 2008 11:19:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2008 04:19:22 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 22 Mar 2008 11:18:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 51055234C09F for ; Sat, 22 Mar 2008 04:17:24 -0700 (PDT) Message-ID: <180273226.1206184644330.JavaMail.jira@brutus> Date: Sat, 22 Mar 2008 04:17:24 -0700 (PDT) From: "David Montag (JIRA)" To: dev@directory.apache.org Subject: [jira] Created: (DIRSTUDIO-308) Syntax checker is brittle for integer syntaxes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Syntax checker is brittle for integer syntaxes ---------------------------------------------- Key: DIRSTUDIO-308 URL: https://issues.apache.org/jira/browse/DIRSTUDIO-308 Project: Directory Studio Issue Type: Bug Environment: Studio version 1.1.0.v20080303, ADS version 1.5.1. Reporter: David Montag First I imported car-schema.ldif (see attachment) into ADS. Then I used this JNDI code to create a car entry: Attributes attributes = new BasicAttributes(); Attribute objectClassAttribute = new BasicAttribute( "objectClass" ); objectClassAttribute.add( "top" ); objectClassAttribute.add( "car" ); attributes.put( objectClassAttribute ); Attribute modelAttribute = new BasicAttribute( "model" ); modelAttribute.add( model ); attributes.put( modelAttribute ); Attribute makeYearAttribute = new BasicAttribute( "makeYear" ); makeYearAttribute.add( makeYear ); attributes.put( makeYearAttribute ); DirContext ctx = new InitialDirContext(env); DirContext carCtx = ctx.createSubcontext( "cn=car", attributes ); carCtx.close(); ctx.close(); model and makeYear are String and int, respectively. Then I get this exception: Operation failed: javax.naming.directory.InvalidAttributeValueException: Malformed 'makeYear' attribute value; remaining name 'cn=car'javax.naming.directory.InvalidAttributeValueException: Malformed 'makeYear' attribute value; remaining name 'cn=car' at com.sun.jndi.ldap.LdapClient.encodeAttribute(LdapClient.java:951) at com.sun.jndi.ldap.LdapClient.add(LdapClient.java:999) at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:770) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(ComponentDirContext.java:319) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:248) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(PartialCompositeDirContext.java:236) at javax.naming.directory.InitialDirContext.createSubcontext(InitialDirContext.java:178) at Car.main(Car.java:104) The value of attributes is: {makeYear=makeYear: 1986, objectClass=objectClass: top, car, model=model: volvo} Any ideas of what could be the matter? -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.