Results 1 to 6 of 6

Thread: Gettings Attributes from an objectclass

  1. #1
    Join Date
    May 2007
    Location
    Timisoara Romania
    Posts
    4

    Default Getting Attributes from an objectclass

    Hi,I would Iike to know how I could get attributes from an objectclass from Oracle Internet Directory.
    For example : cn=Users has some objectclass attributes{top,abstract} and I want to find how I can extract specific attributes for these two objecclass.
    I tryed to use DirContext personSchema = (DirContext) contextUser.getReadWriteContext().getSchemaClassDe finition(""); where contextSource is defined as LdapContextSource dirctx=new LdapContextSource();
    dirctx.setBase("cn=Users,dc=virtual7,dc=local");
    dirctx.setUserName("cn=xxxxxx");
    dirctx.setPassword("xxxxxx");
    dirctx.setUrl("ldap://myadress.local:389");
    dirctx.afterPropertiesSet();
    contextUser = dirctx;;
    but it doesn't work
    Last edited by cristian_sfercoci; May 22nd, 2007 at 07:40 AM.

  2. #2
    Join Date
    May 2007
    Location
    Timisoara Romania
    Posts
    4

    Default

    I also receive:
    javax.naming.NamingException: problem generating object using object factory [Root exception is org.springframework.ldap.BadLdapGrammarException: Failed to parse DN; nested exception is org.springframework.ldap.support.TokenMgrError: Lexical error at line 1, column 5. Encountered: ":" (58), after : ""]; remaining name ''
    at com.sun.jndi.ldap.LdapSearchEnumeration.createItem (LdapSearchEnumeration.java:111)
    at com.sun.jndi.ldap.LdapNamingEnumeration.nextAux(Ld apNamingEnumeration.java:255)
    at com.sun.jndi.ldap.LdapNamingEnumeration.nextImpl(L dapNamingEnumeration.java:235)
    at com.sun.jndi.ldap.LdapNamingEnumeration.next(LdapN amingEnumeration.java:183)
    at com.sun.jndi.ldap.LdapCtx.buildSchemaTree(LdapCtx. java:1594)
    at com.sun.jndi.ldap.LdapCtx.getSchemaTree(LdapCtx.ja va:1560)
    at com.sun.jndi.ldap.LdapCtx.c_getSchema(LdapCtx.java :1501)
    at com.sun.jndi.ldap.LdapCtx.c_getSchemaClassDefiniti on(LdapCtx.java:1522)
    at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_get SchemaClassDefinition(ComponentDirContext.java:436 )
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContex t.getSchemaClassDefinition(PartialCompositeDirCont ext.java:415)
    at com.sun.jndi.toolkit.ctx.PartialCompositeDirContex t.getSchemaClassDefinition(PartialCompositeDirCont ext.java:403)
    at javax.naming.directory.InitialDirContext.getSchema ClassDefinition(InitialDirContext.java:194)
    at com.virtual7.oidportlet.dao.oracle.TestLdap.testGe tObjecRoot(TestLdap.java:132)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at junit.framework.TestCase.runTest(TestCase.java:154 )
    at junit.framework.TestCase.runBare(TestCase.java:127 )
    at junit.framework.TestResult$1.protect(TestResult.ja va:106)
    at junit.framework.TestResult.runProtected(TestResult .java:124)
    at junit.framework.TestResult.run(TestResult.java:109 )
    at junit.framework.TestCase.run(TestCase.java:118)
    at org.eclipse.jdt.internal.junit.runner.junit3.JUnit 3TestReference.run(JUnit3TestReference.java:128)
    at org.eclipse.jdt.internal.junit.runner.TestExecutio n.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:460)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:673)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:386)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:196)

  3. #3
    Join Date
    Sep 2004
    Location
    Copenhagen, Denmark
    Posts
    113

    Default

    What version of Spring LDAP are you using?
    /Claus

  4. #4
    Join Date
    May 2007
    Location
    Timisoara Romania
    Posts
    4

    Default

    1.1.2
    and
    jdk 1.4.2

  5. #5
    Join Date
    May 2007
    Location
    Timisoara Romania
    Posts
    4

    Default

    I tried also with 1.2 but exception persist

  6. #6
    Join Date
    Mar 2005
    Location
    Landskrona, Sweden
    Posts
    505

    Default

    It seems that this is pretty much the same issue as this thread, am I correct?

    It might be an issue to look into; feel free to post a jira issue.
    Cheers,
    Mattias Arthursson
    Jayway AB (www.jayway.se)
    Spring-LDAP project member

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •