You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by B G <fi...@gmail.com> on 2007/10/03 19:55:57 UTC

JIRA entered - DIRSERVER-1082: ServerLdapContext.ldapUnbind not using normalized LdapDN when calling DefaultPartitionNexus.getPartition causing exception when closing InitialDirContext

Just upgraded from using embedded 1.5.0 directory to 1.5.1 and found the
issue mentioned in the subject. This is causing a lot of exceptions to be
logged in the console for our app which is a drag.
The following is the description from the JIRA:

Run the following code against a non-altered running fresh install of the
1.5.1 standalone server:
public static void main(String[] args)
    {
        Hashtable<String,String> env = new Hashtable<String, String>();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "
com.sun.jndi.ldap.LdapCtxFactory");
        env.put(Context.PROVIDER_URL, "ldap://localhost:10389");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system");
        env.put(Context.SECURITY_CREDENTIALS, "secret");

        try
        {
            InitialDirContext ctx = new InitialDirContext(env);
            ctx.close();
        }
        catch (NamingException e)
        {
            e.printStackTrace();
        }
    }

And you will see the following exception:
ERROR [UnbindHandler]: failed to unbind session properly
org.apache.directory.shared.ldap.exception.LdapNameNotFoundException:
uid=admin,ou=system
        at
org.apache.directory.server.core.partition.DefaultPartitionNexus.getPartition
(DefaultPartitionNexus.java:1114)
        at
org.apache.directory.server.core.partition.DefaultPartitionNexus.unbind(
DefaultPartitionNexus.java:773)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$1.unbind(
InterceptorChain.java:210)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain$Entry$1.unbind
(InterceptorChain.java:1412)
        at
org.apache.directory.server.core.interceptor.BaseInterceptor.unbind(
BaseInterceptor.java:229)
        at
org.apache.directory.server.core.interceptor.InterceptorChain.unbind(
InterceptorChain.java:794)
        at
org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(
PartitionNexusProxy.java:684)
        at
org.apache.directory.server.core.partition.PartitionNexusProxy.unbind(
PartitionNexusProxy.java:701)
        at
org.apache.directory.server.core.jndi.ServerLdapContext.ldapUnbind(
ServerLdapContext.java:210)
        at
org.apache.directory.server.ldap.support.UnbindHandler.messageReceived(
UnbindHandler.java:58)
        at org.apache.mina.handler.demux.DemuxingIoHandler.messageReceived(
DemuxingIoHandler.java:141)
        at
org.apache.directory.server.ldap.LdapProtocolProvider$LdapProtocolHandler.messageReceived
(LdapProtocolProvider.java:428)
        at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived
(AbstractIoFilterChain.java:570)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived
(AbstractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(
AbstractIoFilterChain.java:53)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived
(AbstractIoFilterChain.java:648)
        at
org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(
SimpleProtocolDecoderOutput.java:58)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(
ProtocolCodecFilter.java:176)
        at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived
(AbstractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(
AbstractIoFilterChain.java:53)
        at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived
(AbstractIoFilterChain.java:648)
        at org.apache.mina.filter.executor.ExecutorFilter.processEvent(
ExecutorFilter.java:220)
        at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(
ExecutorFilter.java:264)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
        at java.lang.Thread.run(Unknown Source)

This worked fine in 1.5.0

Does anyone have an idea how to work around this except not calling close on
the InitialDirContext?