You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "David Montag (JIRA)" <ji...@apache.org> on 2008/03/22 12:17:24 UTC
[jira] Created: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
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.
[jira] Commented: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
Posted by "Stefan Seelmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSTUDIO-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581266#action_12581266 ]
Stefan Seelmann commented on DIRSTUDIO-308:
-------------------------------------------
Hi David,
it seems this issue is related to the Server, not to Studio. If so, could you please create the Jira under https://issues.apache.org/jira/browse/DIRSERVER and close this Jira?
Thanks,
Stefan
> 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
> Attachments: car-schema.ldif
>
>
> 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.
[jira] Closed: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
Posted by "David Montag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSTUDIO-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Montag closed DIRSTUDIO-308.
----------------------------------
Resolution: Duplicate
This was moved to https://issues.apache.org/jira/browse/DIRSERVER-1156.
> 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
> Attachments: car-schema.ldif
>
>
> 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.
[jira] Commented: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
Posted by "David Montag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSTUDIO-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581273#action_12581273 ]
David Montag commented on DIRSTUDIO-308:
----------------------------------------
This was moved to https://issues.apache.org/jira/browse/DIRSERVER-1156.
> 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
> Attachments: car-schema.ldif
>
>
> 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.
[jira] Updated: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
Posted by "David Montag (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSTUDIO-308?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Montag updated DIRSTUDIO-308:
-----------------------------------
Attachment: car-schema.ldif
LDIF schema for car.
> 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
> Attachments: car-schema.ldif
>
>
> 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.
[jira] Commented: (DIRSTUDIO-308) Syntax checker is brittle for
integer syntaxes
Posted by "Emmanuel Lecharny (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/DIRSTUDIO-308?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581267#action_12581267 ]
Emmanuel Lecharny commented on DIRSTUDIO-308:
---------------------------------------------
Be aware that the new BasicAttributes(); call won't w<ork correctly for LDAP.
LDAP attributeTypes are not case sensitive, and using the default constructor leads to a case sensitive object, thanks to JNDI dumbiness.
Just use a new BasicAttributes( false );
If you can provide a working sample, with a main file, that would help a lot to determinate what is the problem.
> 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
> Attachments: car-schema.ldif
>
>
> 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.