commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Kofler <>
Subject [Configuration] cant get basic JNDIConfiguration to work
Date Mon, 15 Jan 2007 16:45:54 GMT

Is anyone using JNDIConfiguration? 
Strangely no evidence for this could be found on the web/ mailing lists etc.
I would like to implement a LDAP based Configuration, but I cant even read
keys without getting an exception:

javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object];
remaining name ''

Could somebody provide hints / working code that reads from an jndi/ ldap

Second question: Id like to implement my own write functionality for
JNDIConfiguration, is this simply not done because of different possible
JNDI sources, and I will be happy when I do it for a concrete LDAPServer in
Or are there other heavy reasons I should be aware of?

Thank You A Lot,

public class DynamicConfiguarationControllerTest extends TestCase {
	private JNDIConfiguration jndiConfig;
	private Logger log=

	public void setUp() throws NamingException{
		Hashtable env = new Hashtable();
        env.put(Context.SECURITY_AUTHENTICATION, "simple");
        env.put(Context.PROVIDER_URL, "ldap://development1:389");
		LdapContext ctx = new InitialLdapContext(env, null);
        ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, "secret");
		jndiConfig = new JNDIConfiguration(ctx);
	public void testJNDIWrite() throws NamingException{
		for (Iterator keys = jndiConfig.getKeys();keys.hasNext();){ /*****
exception here!! *********
			String key = (String);

View this message in context:
Sent from the Commons - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message