directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <ole.er...@gmail.com>
Subject Re: [Syntax] Does this code look ok for creating a Syntax entry?
Date Sat, 14 Apr 2007 22:09:21 GMT
OK - I gave it a try, aaand (Drum Roll) I get this:

javax.naming.NameNotFoundException: [LDAP: error code 32 - failed to add 
entry 
m-oid=1.3.6.1.4.1.18060.0.4.0.0.100000.11123.11233,ou=syntaxes,ou=schema: 
Parent ou=syntaxes,ou=schema not found];

DOH!

Is there a java file somewhere that contains the DNs for
various schema entry parents (AttributeTypes, ObjectClasses, etc)?

Thanks,
- Ole




Alex Karasulu wrote:
> Sure give it a try :).
>  
> Alex
> 
>  
> On 4/3/07, *Ole Ersoy* <ole.ersoy@gmail.com 
> <mailto:ole.ersoy@gmail.com>> wrote:
> 
>     private static final String PEN = "35453";
>     private static final String ESTRING_SYNTAX_LOCAL_OID = "1";
>     private static final String ESTRING_SYNTAX_GLOBAL_OID = PEN +"." +
>     ESTRING_LOCAL_OID;
>     private static final String ESTRING_SYNTAX_DESCRIPTION = "Ecore String
>     DataType";
>     ...
>     Attributes ldapAttributes = new AttributesImpl();
>     Attribute objectClass = new AttributeImpl(
>            SystemSchemaConstants.OBJECT_CLASS_AT,
>            "top" );
>     objectClass.add( MetaSchemaConstants.META_TOP_OC );
>     objectClass.add( MetaSchemaConstants.META_SYNTAX_OC );
>     ldapAttributes.put( objectClass );
>     ldapAttributes.put( MetaSchemaConstants.M_OID_AT,
>     ESTRING_SYNTAX_GLOBAL_OID );
>     ldapAttributes.put( MetaSchemaConstants.M_DESCRIPTION_AT,
>     ESTRING_SYNTAX_DESCRIPTION );
> 
>     String eStringSyntaxRDN = "MetaSchemaConstants.M_OID_AT + "=" +
>     ESTRING_SYNTAX_GLOBAL_OID;
> 
>     //With the current context being "ou=syntaxes,ou=schema"
>     ctx.createSubcontext(eStringSyntaxRDN, ldapAttributes);
> 
> 

Mime
View raw message