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 6098271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:08:20+00:00 2026-05-23T13:08:20+00:00

In a Spring Security, I defined a jdbc auth manager: <security:authentication-manager> <security:authentication-provider> <security:jdbc-user-service data-source-ref=securityDataSource/>

  • 0

In a Spring Security, I defined a jdbc auth manager:

<security:authentication-manager>
    <security:authentication-provider>
        <security:jdbc-user-service data-source-ref="securityDataSource"/>
    </security:authentication-provider>
</security:authentication-manager>

<bean id="securityDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
    <property name="driverClassName" value="org.postgresql.Driver"/>
    <property name="url" value="jdbc:postgresql://127.0.0.1:5432/mydb"/>
    ... user and password props ...
</bean>

At this point I’ve discovered that I need Jakarta Commons DBCP.
I’ve added commons-dbcp-1.4, i get the following exception:

...java.lang.NoClassDefFoundError: org/apache/commons/pool/KeyedObjectPoolFactory

This path actually isn’t included in commons dbcp 1.4.
What am I missing again?

EDITED
Ok, added the dependency to common pool, it works because with the right credentials I no more get the “bad credentials” page.
But I get an HTTP Status 403 – Access is denied.
Seems like my user is authenticated , but isn’t authorized.
Any idea…? 🙂

My http element is:

<security:http auto-config="true" >
    <security:intercept-url pattern="/**" access="ROLE_USER"/>
</security:http>

and I have a “test” user that is bind to the “USER” role in the “authorities” table.

thanks

  • 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-05-23T13:08:20+00:00Added an answer on May 23, 2026 at 1:08 pm

    Commons DBCP relies on the Commons Pools libraries, because of this, you actually need to download the commons-pool jar files, and include them in your path.

    Commons Pool Downloads

    You may also need to download the commons-collections package, too.

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

Sidebar

Related Questions

I have a custom-authentication-provider defined in my Spring Security configuration. This class implements AuthenticationProvider,
I've implemented authentication through WS-Security on my webservice as described at http://static.springframework.org/spring-ws/sites/1.5/reference/html/security.html , like
I want to use Spring Security to manage user, group and permissions. I want
I am trying to programatically validate a user login/pass using Spring Security, so I
I'm using spring security, and I need to get the User domain object in
I'm trying to implement spring-security to handle authentication and authorization of my web application.
I'm a reasonably new user of Spring Security. I previously configured Spring Security to
I have my spring security set up to do basic authentication to a database
Spring security has a nice feature, it remembers the url of request resource and
I'm new to Spring Security. How do I add an event listener which will

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.