Hi,
I'm having trouble with spring-ldap and service mix.
when I invoke the ldapTemplate I get this exception:
Caused by: javax.naming.NoInitialContextException: Unable to determine
caller's BundleContext
at
org.apache.aries.jndi.OSGiInitialContextFactoryBuilder.getInitialContext(OSGiInitialContextFactoryBuilder.java:49)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)[:1.7.0_45]
at
javax.naming.InitialContext.init(InitialContext.java:242)[:1.7.0_45]
at
javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:153)
at
org.springframework.ldap.core.support.LdapContextSource.getDirContextInstance(LdapContextSource.java:43)
at
org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:254)
My blueprint config:
<bean id="contextSource"
class="org.springframework.ldap.core.support.LdapContextSource"
init-method="afterPropertiesSet">
<property name="url" value="ldap://devec01.dev.sss.com:389" />
<property name="base" value="o=myddss" />
<property name="userDn" value="CN=directory manager" />
<property name="password" value="nopassword" />
</bean>
<bean id="ldapTemplate"
class="org.springframework.ldap.core.LdapTemplate">
<argument ref="contextSource" />
</bean>
I'm using ServiceMix 4.5.3 and java 7 and spring ldap 1.3.1
Any ideas?
thanks,
Matt