Java Spring数据ldap不是持久化用户,但ldap模板可以工作

Java Spring数据ldap不是持久化用户,但ldap模板可以工作,java,spring,spring-boot,ldap,Java,Spring,Spring Boot,Ldap,我试图使用SpringDataLDAP持久化一个新用户以打开DJLDAP服务器。它与LdapTemplate配合得很好。但如果我尝试使用Spring数据,则不会考虑对象类,并且会出现以下错误: javax.naming.directory.SchemaViolationException:[LDAP:错误代码65-无法修改条目dc=example,dc=com,因为生成的条目会违反服务器架构:条目dc=example,dc=com违反目录服务器架构配置,因为它包含该条目中定义的任何ObjectC

我试图使用SpringDataLDAP持久化一个新用户以打开DJLDAP服务器。它与LdapTemplate配合得很好。但如果我尝试使用Spring数据,则不会考虑对象类,并且会出现以下错误:

javax.naming.directory.SchemaViolationException:[LDAP:错误代码65-无法修改条目dc=example,dc=com,因为生成的条目会违反服务器架构:条目dc=example,dc=com违反目录服务器架构配置,因为它包含该条目中定义的任何ObjectClass都不允许的属性cn]
在java.naming/com.sun.jndi.ldap.LdapCtx.maperrocode(LdapCtx.java:3190)~[na:na]
在java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:3105)~[na:na]
在java.naming/com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2896)~[na:na]
在java.naming/com.sun.jndi.ldap.LdapCtx.c_modifyAttributes(LdapCtx.java:1476)~[na:na]
在java.naming/com.sun.jndi.toolkit.ctx.ComponentDirContext.p_modifyAttributes(ComponentDirContext.java:277)~[na:na]
在java.naming/com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.modifyAttributes(PartialCompositeDirContext.java:192)~[na:na]
在java.naming/javax.naming.directory.InitialDirContext.modifyAttributes(InitialDirContext.java:201)~[na:na]
在org.springframework.ldap.core.LdapTemplate$19.executeWithContext(LdapTemplate.java:966)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.ldap.core.LdapTemplate.executeWithContext(LdapTemplate.java:817)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.ldap.core.LdapTemplate.executeReadWrite(LdapTemplate.java:812)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.ldap.core.LdapTemplate.modifyAttributes(LdapTemplate.java:964)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.ldap.core.LdapTemplate.modifyAttributes(LdapTemplate.java:1317)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.ldap.core.LdapTemplate.update(LdapTemplate.java:1778)~[spring-ldap-core-2.3.3.RELEASE.jar:2.3.3.RELEASE]
在org.springframework.data.ldap.repository.support.SimpleLdapRepository.save(SimpleLdapRepository.java:110)~[spring-data-ldap-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(本机方法)~[na:na]
在java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:na]
在java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:na]
在java.base/java.lang.reflect.Method.invoke(Method.java:567)~[na:na]
在org.springframework.data.repository.core.support.ImplementationInvocationMetadata.invoke(ImplementationInvocationMetadata.java:72)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:382)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:205)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:549)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:155)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:130)~[spring-data-commons-2.3.4.RELEASE.jar:2.3.4.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在com.sun.proxy.$Proxy62.save(未知源)~[na:na]
在java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(本机方法)~[na:na]
在java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:na]
在java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:na]
在java.base/java.lang.reflect.Method.invoke(Method.java:567)~[na:na]
在org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:163)~[spring-aop-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)~[spring-tx-5.2.9.RELEASE.jar:5.2.9.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[springaop