[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: schema voilation -- javaContainer ???
Here's how to get around this ...
According to RFC 2251, in section 4.7 the ... ' Clients MUST include distinguished values
(those forming the entry's own RDN) in this list'
OpenLdap is being very strict in enforcing this. So you can get around this by doing
something similar to the following...
Attribute cn = new BasicAttribute("cn" , "obj1");
Attribute objectClass = new BasicAttribute("objectclass");
objectClass.add("top");
objectClass.add("javaContainer");
objectClass.add("javaObject");
objectClass.add("javaSerialisedObject");
Attributes attrs = new BasicAttributes();
attrs.put(objectClass);
attrs.put(cn);
ctx.bind("cn=obj1,ou=Add,o=imc,c=us", obj , attrs );
-Jonathan
Anita Suriarajan wrote:
>
> Hello,
>
> Iam getting Schema Voilation error and in the LDAP Server its giving me -
> oc "javaContainer" requires attr "cn"
>
> my entry is :
>
> Base Entry:
>
> dc=iperia,dc=com
> objectClass=dcObject
> objectClass=Organization
> objectClass=organizationalUnit
> objectClass=Top
> objectClass=javaContainer
> o=IPERIA Inc
> dc=iperia
> ou=Top Manager
> cn=Manager
>
> cn=CorbaHello,dc=iperia,dc=com
> objectClass=javaContainer
> objectClass=people
> objectClass=Top
> cn=CorbaHello
>
> error at my client:
>
> Operation failed: javax.naming.directory.SchemaViolationException: [LDAP:
> error cod
> e 65 - missing required attribute]; remaining name
> 'cn=CorbaHello,dc=iperia,dc=com':
>
> at my server:
> is_entry_objectclass("cn=CorbaHello,dc=iperia,dc=com,dc=iperia,dc=com",
> "2.16.840.1.11
> 3730.3.2.6") no objectClass attribute
>
> => dn2id( "CN=CORBAHELLO,DC=IPERIA,DC=COM,DC=IPERIA,DC=COM" )
> => ldbm_cache_open( "/usr/local/var/openldap-ldbm/dn2id.dbb", 7, 600 )
> <= ldbm_cache_open (cache 0)
> <= dn2id NOID
> oc_check_required entry (cn=CorbaHello,dc=iperia,dc=com,dc=iperia,dc=com),
> objectclass
> "top"
>
> oc_check_required entry (cn=CorbaHello,dc=iperia,dc=com,dc=iperia,dc=com),
> objectclass
> "javaContainer"
>
> Entry (cn=CorbaHello,dc=iperia,dc=com,dc=iperia,dc=com), oc "javaContainer"
> requires a
> ttr "cn"
>
> entry failed schema check: missing required attribute
>
> my program looks like this:
>
> ORB orb = ORB.init(args, null);
> helloServant helloRef = new helloServant();
> orb.connect(helloRef);
> env.put("java.naming.corba.orb", orb);
> DirContext ctx = new InitialDirContext(env);
> ctx.bind("cn=CorbaHello,dc=iperia,dc=com", helloRef);
> HelloApp.Hello h2 = HelloApp.HelloHelper.narrow(
> (org.omg.CORBA.Object)ctx.lookup("cn=CorbaHello"));
> System.out.println(h2.sayHello());
>
> ==========
>
> if iam trying to give my ctx.bind to be cn=CorbaHello, then iam getting
> NameAlreadyBound Exception....
>
> ==========
> cud anyone help me???
> Regards
> Anita