directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Montag (JIRA)" <>
Subject [jira] Created: (DIRSTUDIO-308) Syntax checker is brittle for integer syntaxes
Date Sat, 22 Mar 2008 11:17:24 GMT
Syntax checker is brittle for integer syntaxes

                 Key: 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 );

model and makeYear are String and int, respectively.

Then I get this exception:

Operation failed: Malformed 'makeYear'
attribute value; remaining name 'cn=car'
Malformed 'makeYear' attribute value; remaining name 'cn=car'

	at com.sun.jndi.ldap.LdapClient.encodeAttribute(
	at com.sun.jndi.ldap.LdapClient.add(
	at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(
	at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(
	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(
	at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(
	at Car.main(

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.

View raw message