Xilang
Xilang

Reputation: 1513

Spring embedded LDAP get error: "No schema information returned by server, using default schema"

I start an embedded LDAP server using spring-security-ldap's ApacheDSContainer class, after LDIF imported, I try to connect LDAP server using Apache Directory Studio. Then an error will popup:

Error while opening connection
- [LDAP: error code 32 - NO_SUCH_OBJECT: failed for     SearchReques
- No schema information returned by server, using default schema.
javax.naming.NameNotFoundException: [LDAP: error code 32 - NO_SUCH_OBJECT: failed for     SearchRequest
    baseDn : '2.5.4.3=schema'
    filter : '(2.5.4.0=subschema)'
    scope : base object
    typesOnly : false
    Size Limit : no limit
    Time Limit : no limit
    Deref Aliases : deref Always
    attributes : 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingrules', 'matchingruleuse', 'createtimestamp', 'modifytimestamp'
:  Cannot find a partition for 2.5.4.3=schema]; remaining name 'cn=schema'
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.searchAux(Unknown Source)
at com.sun.jndi.ldap.LdapCtx.c_search(Unknown Source)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(Unknown Source)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(Unknown Source)
at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper$1.run(JNDIConnectionWrapper.java:356)
at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.runAndMonitor(JNDIConnectionWrapper.java:1272)
at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.checkConnectionAndRunAndMonitor(JNDIConnectionWrapper.java:1203)
at org.apache.directory.studio.connection.core.io.jndi.JNDIConnectionWrapper.search(JNDIConnectionWrapper.java:398)
at org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable.search(SearchRunnable.java:500)
at org.apache.directory.studio.ldapbrowser.core.jobs.ExportLdifJob.search(ExportLdifJob.java:226)
at org.apache.directory.studio.ldapbrowser.core.jobs.ReloadSchemaRunnable.reloadSchema(ReloadSchemaRunnable.java:175)
at org.apache.directory.studio.ldapbrowser.core.BrowserConnectionListener.openBrowserConnection(BrowserConnectionListener.java:115)
at org.apache.directory.studio.ldapbrowser.core.BrowserConnectionListener.connectionOpened(BrowserConnectionListener.java:65)
at org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable.runNotification(OpenConnectionsRunnable.java:132)
at org.apache.directory.studio.connection.core.jobs.StudioConnectionJob.run(StudioConnectionJob.java:120)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

[LDAP: error code 32 - NO_SUCH_OBJECT: failed for     SearchRequest
    baseDn : '2.5.4.3=schema'
    filter : '(2.5.4.0=subschema)'
    scope : base object
    typesOnly : false
    Size Limit : no limit
    Time Limit : no limit
    Deref Aliases : deref Always
    attributes : 'objectclasses', 'attributetypes', 'ldapsyntaxes', 'matchingrules', 'matchingruleuse', 'createtimestamp', 'modifytimestamp'
:  Cannot find a partition for 2.5.4.3=schema]
No schema information returned by server, using default schema.

If I ignore the error, all function works good

Upvotes: 0

Views: 3278

Answers (2)

Felipe Volpato
Felipe Volpato

Reputation: 401

Many LDAP servers provide information about their configuration and functional abilities. This information is stored in such a way that LDAP clients can directly access it using a search operation. For example, a client can fetch the root DSE record to find out the basic capabilities of the server. It can also access the subschema of the server and find out what object classes, syntaxes, matching rules, and attributes are supported.

The root DSE (DSA-Specific Entry, where DSA stands for Directory Service Agent) is a special entry that provides information about the server itself. The DN of the root DSE is an empty string ("").

access to dn.base=""
by dn="cn=admin,dc=example,dc=com" write
by dn="cn=guest,dc=example,dc=com" read
by anonymous auth
by * none

It will enable that admin and a specific user (for instance guest) get the server information.

Upvotes: 0

damko
damko

Reputation: 291

I think you are providing the wrong base dn and the wrong filter.

baseDn : '2.5.4.3=schema'
filter : '(2.5.4.0=subschema)'

Try to check the parameters of the ADS connection

Upvotes: 0

Related Questions