Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:58:50+00:00 2026-06-16T01:58:50+00:00

I´m new in this little world, and I´m trying to develope a Spring Ldap

  • 0

I´m new in this little world, and I´m trying to develope a Spring Ldap Transaction and I have serious problems with the Spring bean creation.

I have this config XML file:

<bean id="ldapContextSource" class="org.springframework.ldap.core.support.LdapContextSource">
    <property name="url" value="ldap://localhost:10389" />
    <property name="base" value="dc=***,dc=com" />
    <property name="authenticationSource" ref="authenticationSource" />
    <property name="pooled" value="false" />
    <property name="baseEnvironmentProperties">
        <map>
            <entry key="com.sun.jndi.ldap.connect.timeout" value="500" />
            <entry key="java.naming.referral" value="follow" />
        </map>
    </property>
</bean>

<bean id="authenticationSource"
    class="org.springframework.ldap.authentication.DefaultValuesAuthenticationSourceDecorator">
    <property name="target" ref="springSecurityAuthenticationSource" />
    <property name="defaultUser" value="uid=admin,ou=system" />
    <property name="defaultPassword" value="secret" />
</bean>

<bean id="springSecurityAuthenticationSource"
    class="org.springframework.security.ldap.authentication.SpringSecurityAuthenticationSource" />

<bean id="ldapTransactionContextSource"
    class="org.springframework.ldap.transaction.compensating.manager.TransactionAwareContextSourceProxy">
    <constructor-arg ref="ldapContextSource" />
</bean>

<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
    <constructor-arg ref="ldapTransactionContextSource" />
</bean>

<bean id="transactionManager"
    class="org.springframework.ldap.transaction.compensating.manager.ContextSourceTransactionManager">
    <property name="contextSource" ref="ldapTransactionContextSource" />
</bean>

<bean id="userDaoTarget" class="com.***.daos.UserDao">
    <property name="ldapTemplate" ref="ldapTemplate" />
</bean>

<bean id="userDao"
    class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    <property name="transactionManager" ref="transactionManager" />
    <property name="target" ref="userDaoTarget" />
    <property name="transactionAttributes">
        <props>
            <prop key="*">PROPAGATION_REQUIRES_NEW</prop>
        </props>
    </property>
</bean>

And I have problems when the “userDaoTarget” bean is created because it trows this exception:

java.lang.NoClassDefFoundError: org.springframework.beans.FatalBeanException
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:943)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:605)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:925)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:472)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:140)
    at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:84)

Finaly my UserDao.class is the next code:

public class UserDao extends CommonDao implements ICommonDao<User> {

    private LdapTemplate ldapTemplate;

    public void setLdapTemplate(LdapTemplate ldapTemplate) {
        this.ldapTemplate = ldapTemplate;
    }
}

Can someone help me with the bean creation? I think that the code is correct but i dont know what happens…

Thanks all for your time

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T01:58:51+00:00Added an answer on June 16, 2026 at 1:58 am

    What Spring dependencies do you have on your classpath? Specifically, do you have the

    org.springframework.beans-<version>.jar
    

    artifact?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a little problem. This is my code: stackPanelShapesContainer = new StackPanel(); InitializeStackPanle();
I'm quite new to this Git thing and need a little help. I recently
i am new to this core graphics or cv . I need a little
hello i am little new to all this but i want to know that:
i am new to RoR and I am a little confused on this topic.
I am new this sharepoint development and i have task in hand to do
New to this library (no more familiar with BeautifulSoup either, sadly), trying to do
Im new to this.I have a cron file called xml.php and i want to
I'm trying to develop a webapp with Restlet and I have a little problem
I am trying to use a Canvas to display objects that have world location

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.