Announcement Announcement Module
Collapse
No announcement yet.
Help with migrating from 1.2.1 to 1.3.0.RELEASE Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with migrating from 1.2.1 to 1.3.0.RELEASE

    Hi,

    I'm using spring-ldap for a while (I didn't wrote the code, so I'm a little noob ), and I would like to update the version from 1.2.1 to 1.3.0.RELEASE.
    I did modified the pom.xml file, so it looks like this:
    Code:
    <dependency>
                <groupId>org.springframework.ldap</groupId>
                <artifactId>spring-ldap-core</artifactId>
                <version>1.3.0.RELEASE</version>
    </dependency>
    This is a console application with maven and uses CLI so it doesn't need spring for UI.

    I didn't changed anything on springldap.xml, so it looks like something this:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
        <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
            <property name="url" value="ldap://somehost:389" />
            <property name="base" value="dc=something,dc=en" />
            <property name="userDn" value="cn=Directory Manager" />
            <property name="password" value="password" />
        </bean>
        <bean id="authContext" class="org.springframework.ldap.core.support.LdapContextSource">
            <property name="url" value="ldap://somehost:389" />
            <property name="base" value="dc=something,dc=en" />
        </bean>
        <bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
            <constructor-arg ref="contextSource" />
        </bean>
        <bean id="ldapContact" class="package.name.LdapHandler">
            <property name="ldapTemplate" ref="ldapTemplate" />
        </bean>
        <bean id="ldapGroup" class="package.name.LdapGroupHandler">
            <property name="ldapTemplate" ref="ldapTemplate" />
        </bean>
    </beans>
    Creating the ldapTemplate in LdapHandler.ava looks like this:
    Code:
    FileSystemResource resource = new FileSystemResource("/path/to/xml/springldap-temp.xml");
                    LdapHandler.springBeanFactory = new XmlBeanFactory(resource);
                    INSTANCE = (LdapHandler) LdapHandler.springBeanFactory.getBean("ldapContact");
    And the Exception looks like this:
    Code:
    Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ldapContact' defined in file [/path/to/xml/springldap-temp.xml]: Initialization of bean failed;
    nested exception is java.lang.NoClassDefFoundError: org/springframework/dao/EmptyResultDataAccessException
    I really don't know, what am I doing wrong...
    This configuration worked perfectly with 1.2.1.
    Is there some changes in core, that I missed to follow?
    Please help me

    Thanks,
    Peter, Major
Working...
X