ServerLdapContext.ldapUnbind not using normalized LdapDN when calling
DefaultPartitionNexus.getPartition causing exception when closing
InitialDirContext
---------------------------------------------------------------------------------------------------------------------------------------------------------
Key: DIRSERVER-1082
URL: https://issues.apache.org/jira/browse/DIRSERVER-1082
Project: Directory ApacheDS
Issue Type: Bug
Components: ldap
Affects Versions: 1.5.1
Environment: Windows
Reporter: Brian Gadwell
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.