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

  • SEARCH
  • Home
  • 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 5958761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:35:21+00:00 2026-05-22T18:35:21+00:00

I am using a customized UserDetailsService for my Spring security settings. The customized UserDetailsService

  • 0

I am using a customized UserDetailsService for my Spring security settings.
The customized UserDetailsService has only one method which overrides loadUserByUsername(final String username) in UserDetailsService.

I’ve below configuration in applicationConext-security.xml:

<authentication-manager alias="myAuthenticationManager">
      <authentication-provider user-service-ref="userDetailsService"/>
</authentication-manager>

<beans:bean id="userDetailsService"
    class="temp.com.JpaUserDetailsService" />

However when I tried to login using a username I get the error saying the arguement “username” is null. I wonder where does username come from and how can I avoid it to be null?

  • 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-22T18:35:21+00:00Added an answer on May 22, 2026 at 6:35 pm

    There are several possibilities for this, and since you haven’t posted any stack trace, it’s unclear if the problem is in your code, or configuration:

    • You have configured the filter chain explicitly, and are either missing filters or have the standard filters in the wrong order.
      • Suggestion: Replace your custom filter chain (temporarily) with the default one and make sure it works.
    • You have a bug in your custom UserDetailsService
      • Suggestion: Use a debugger to verify what username you are being passed).
    • Your login form (assuming you are using form-based authentication) is not set up with the correct username/password fields
      • Suggestion: j_username and j_password are the standard field names (unless you have customized them). If you’re using JSF, GWT, or some other UI technology that mangles field names, you’ll need to account for this.
    • You may have something else incorrectly configured
      • Suggestion: Remove your custom UserDetailsService and replace it with the standard, simple, in-memory service, to make sure your basic configuration works before augmenting with custom stuff.

    If you can post your full configuration (specifically noting whatever you have customized), I/we can offer more precise advice, but I would suggest that one of these things is most likely to be your problem.

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

Sidebar

Related Questions

I'm developing one android application in which I'm using one customized ListView which extends
We are developing customized installer using visual studio 2008 installer project. The requirement which
I am using map kit and showing customized annotation view. One is carImage and
We're using Infragistics UltraWinGrid as a base class for customized controls. One of the
i have the following customized security controller using the secure module for play: public
I'm using spring CDI and a customized View scope. (See this about how it
I have been using wordpress plugins and I have customized one of my plugin
We are developing a customized installer using Wix and Wpf. We have developed some
When a class is customized, by using its outlet , you cant access its
I am currently using Hibernate Tools 3.1; I customized naming convention and DAO templates.

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.