• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unable to create directory in OID

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am writing java code to load users into the Oracle Internet Directory. OID and LDAPs are new to me. On install, one of the directories automatically created in OID was "cn=Users, dc=dex, dc=com". I have able to add employees to that directory with no problem. Now I would like to create a new directory for Vendors. Even though I am logging in as the administrator, I am getting an error message claiming I do not have access privileges. I created a small program that successfully adds a user (so that you know I am at least connecting to OID correctly) and then unsuccessfully attempts to create a Vendor directory. What am I doing wrong?

Thanks,
Ross


THE PROGRAM OUTPUT...

Start

Created context

Created user

About to create vendor directory

javax.naming.NoPermissionException: [LDAP: error code 50 - Insufficient Access Rights]; remaining name 'cn=Vendors, dc=dex, dc=com'

javax.naming.NamingException com.sun.jndi.ldap.LdapCtx.mapErrorCode(int, java.lang.String)

void com.sun.jndi.ldap.LdapCtx.processReturnCode(com.sun.jndi.ldap.LdapResult, javax.naming.Name, java.lang.Object, javax.naming.Name, java.util.Hashtable, java.lang.String)

void com.sun.jndi.ldap.LdapCtx.processReturnCode(com.sun.jndi.ldap.LdapResult, javax.naming.Name)

javax.naming.directory.DirContext com.sun.jndi.ldap.LdapCtx.c_createSubcontext(javax.naming.Name, javax.naming.directory.Attributes, com.sun.jndi.toolkit.ctx.Continuation)

javax.naming.directory.DirContext com.sun.jndi.toolkit.ctx.ComponentDirContext.p_createSubcontext(javax.naming.Name, javax.naming.directory.Attributes, com.sun.jndi.toolkit.ctx.Continuation)

javax.naming.directory.DirContext com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(javax.naming.Name, javax.naming.directory.Attributes)

javax.naming.directory.DirContext com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)

javax.naming.directory.DirContext javax.naming.directory.InitialDirContext.createSubcontext(java.lang.String, javax.naming.directory.Attributes)

void com.dex.oidsync.sessionfacade.Sample.main(java.lang.String[])

Process exited with exit code 0.


THE PROGRAM...



[added the code tags Mark described]
[ February 26, 2005: Message edited by: Jeanne Boyarsky ]
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ross. Thats a good question. Unfortunately I am unfamiliar with OID, so I can't help you there.
But I did want to let you know that when you post, there is a "CODE" tag button below that you can click and paste your code in between the two tags that it creates.
This will keep all your formatting in place and your indentation.
Mark
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
well the good news is that i am able to enter user using your code till the user created statement with some modification according to my need. but it works successfully when i am assigning values in program itself. when i try to send values through some method, then it throws the error.
in following code main function has two funtion setuserproperties(parameters) and createuser(). when i user both functions then error comes. and when i user just createuser and userproperties assign there itself(as u can see commented assign varialbles) it works successfully.
i not able to find the root cause, why it generate error when only the difference is sending the parameters and assiging there only.
please help me out.

OUTPUT with ERROR msg:
EMPLOYEE_ID : 1012

USERNAME: ldapuser12

UID_ADDR: davidfranklin1@domain.com

Start

Created context

All Attributes Added

javax.naming.CommunicationException: Request: 2 cancelled; remaining name 'cn=ldapuser12,cn=Users,dc=domain, dc=com'

at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)

at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)

at com.sun.jndi.ldap.LdapClient.processReply(LdapClient.java:947)

at com.sun.jndi.ldap.LdapClient.add(LdapClient.java:1098)

at com.sun.jndi.ldap.LdapCtx.c_createSubcontext(LdapCtx.java:773)

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:176)

at mypackage.SampleUser.createuser(SampleUser.java:173)

at mypackage.SampleUser.main(SampleUser.java:189)



[ February 26, 2005: Message edited by: Jeanne Boyarsky ]
[ March 09, 2005: Message edited by: Abhishek Mehta ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had a similar problem and found out, that the error message was completely misleading. In my case the real reason was an attribute called "orclactiveenddate" which usually holds a date value. The exception was thrown, when the attributes' value was set to an empty String. In the above code the value of START_DATE is an empty String and may have caused the problem.
[ May 30, 2006: Message edited by: Ludwig Mueller ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic