Announcement Announcement Module
Collapse
No announcement yet.
Gettings Attributes from an objectclass Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gettings 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, 07:40 AM.

  • #2
    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)

    Comment


    • #3
      What version of Spring LDAP are you using?

      Comment


      • #4
        1.1.2
        and
        jdk 1.4.2

        Comment


        • #5
          I tried also with 1.2 but exception persist

          Comment


          • #6
            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,

            Comment

            Working...
            X