Erro ao gerar um gidNumber no Spring-Ldap

0 respostas
Pilantra

Olá pessoal,

Alguém poderia me ajudar com esse problema? Estou fazendo uma aplicação que trabalha com o Ldap, até agora funcionou perfeitamente, mas agora que está entrando a parte de cadastro de usuários com o objectclass posixAccount e posixGroup, está dando o seguinte erro:

<blockquote>org.springframework.ldap.InvalidAttributeValueException: Malformed gidNumber attribute value; nested exception is javax.naming.directory.InvalidAttributeValueException: Malformed gidNumber attribute value; remaining name 'cn=escreventes, ou=grupos’

at org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:122)

at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:786)

at org.springframework.ldap.core.LdapTemplate.executeReadWrite(LdapTemplate.java:779)

at org.springframework.ldap.core.LdapTemplate.bind(LdapTemplate.java:982)

at br.org.squidadmin.server.GroupLdapDao.create(GroupLdapDao.java:66)

at br.org.squidadmin.server.GroupLdapDaoTest.testCreate(GroupLdapDaoTest.java:55)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at junit.framework.TestCase.runTest(TestCase.java:168)

at junit.framework.TestCase.runBare(TestCase.java:134)

at junit.framework.TestResult$1.protect(TestResult.java:110)

at junit.framework.TestResult.runProtected(TestResult.java:128)

at junit.framework.TestResult.run(TestResult.java:113)

at junit.framework.TestCase.run(TestCase.java:124)

at junit.framework.TestSuite.runTest(TestSuite.java:232)

at junit.framework.TestSuite.run(TestSuite.java:227)

at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Caused by: javax.naming.directory.InvalidAttributeValueException: Malformed gidNumber attribute value; remaining name 'cn=escreventes, ou=grupos’

at com.sun.jndi.ldap.LdapClient.encodeAttribute(LdapClient.java:951)

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

at com.sun.jndi.ldap.LdapCtx.c_bind(LdapCtx.java:379)

at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_bind(ComponentDirContext.java:277)

at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.bind(PartialCompositeDirContext.java:197)

at javax.naming.directory.InitialDirContext.bind(InitialDirContext.java:163)

at org.springframework.ldap.core.LdapTemplate$21.executeWithContext(LdapTemplate.java:985)

at org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:784)

 23 more</blockquote>

Estou testando em um TestCase!! Criei um pojo para mapear as entradas do Ldap, como explica na documentação do Spring e estou setando manualmente o gidNumber. Eu não sei se tem algum esquema para setar esse número.

Alguém me ajuda?

Valeuu!!

Criado 18 de julho de 2008
Respostas 0
Participantes 1