directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: new LdapNetworkConnection throws Illegal Argument exception
Date Mon, 05 Dec 2011 08:48:39 GMT
On 12/5/11 7:40 AM, Christoph Czurda wrote:
> Hi!
> I have tried to connect to ApacheDS server using LDAP api. However I got
> the following error:
> Exception in thread "pool-16-thread-1"
> java.lang.IllegalArgumentException: factory
> 	at
> org.apache.mina.filter.codec.ProtocolCodecFilter.<init>(
> 	at
> The exception is thrown here:
> LdapConnection connection = new LdapNetworkConnection( "localhost", 10389 );
> What could be the problem?

It's a bit complicated. You need to have a ProtocolCodecFactory loaded 
before being able to instanciate the ProtocolCodecFilter class, and that 
means you must  include the 
class into your environment. This class is loaded using reflection, 
unless you specify another one, and it's present in the 
shared-ldap-net-mina jar.

Include it into your loaded bundles, and you should be fine (assuming 
ypu also have the bundles this bundle depends on present too.)

Emmanuel L├ęcharny

View raw message