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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:56:22+00:00 2026-06-10T08:56:22+00:00

I have a working 3.0.2 applicationContext-security.xml that uses a custom authenticator <global-method-security pre-post-annotations=disabled> </global-method-security>

  • 0

I have a working 3.0.2 applicationContext-security.xml that uses a custom authenticator

<global-method-security pre-post-annotations="disabled">

</global-method-security>

<http use-expressions="true">

    <intercept-url pattern="/diagnostics/**" access="hasRole('ROLE_USER')" />


    <form-login login-page="/genesis" default-target-url="/diagnostics/start-diagnostics"
      authentication-failure-url="/genesis?authfailed=true"
      authentication-success-handler-ref="customTargetUrlResolver"/>
      <access-denied-handler error-page="/genesis?notauthorized=true"/>

     <logout logout-success-url="/genesis"/> 
    <session-management session-authentication-error-url="/genesis"> 
        <concurrency-control max-sessions="1" expired-url="/genesis?sessionExpired=true"/> 
    </session-management>
</http>

<authentication-manager>
<authentication-provider ref="genesisAuthenticator">
    <jdbc-user-service data-source-ref="dataSource"/>
</authentication-provider>
</authentication-manager>

<beans:bean id="genesisAuthenticator" class="com.blackbox.x.web.security.Authenticator"/>
<beans:bean id="customTargetUrlResolver" class="com.blackbox.x.web.security.StartPageRouter"/>   

</beans:beans>

After upgrading to 3.1.2 my application will not start and I get the error message

“Configuration problem: authentication-provider element cannot have child elements when used with ‘ref’ attribute”. I’m assuming that the problem lies with the

<jdbc-user-service data-source-ref="dataSource"/>

element where data-source-ref points to a definition in my application-context.xml file.

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/genesis"/>
<property name="username" value="dbuser"/>
<property name="password" value="********"/>

What do I need to do to get this working. Dropping back to 3.0.2 is not really an option.

  • 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-10T08:56:24+00:00Added an answer on June 10, 2026 at 8:56 am

    If you use a custom AuthenticationProvider implementation you’ll have to configure it in XML in “traditional” Spring way, because <security:authentication-provider ref="yourImpl"> just points to bean which can authenticate whatever in whatever way, and don’t really have to use UserDetailsService at all. In your example you tried to use jdbc-user-service which is just shortcut for creating JdbcDaoImpl bean.

    So what you have to do is to assure that all genesisAuthenticator dependencies are resolved by yourself not Spring Security. That is you should either add @Autowired setUserDetailsService(UserDetailsService userDetailsService) method to your bean or configure it in XML like this (using id attribute):

    <beans:bean id="genesisAuthenticator"
        class="com.blackbox.x.web.security.Authenticator">
      <property name="userDetailsService" ref="jdbcUserService"/>      
    </beans:bean>
    
    <jdbc-user-service id="jdbcUserService" data-source-ref="dataSource" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have working web-application with applicationContext.xml in WEB-INF/config/applicationContext.xml. Now i need to implement some
I'm working on an application which uses SQLite Database on Android.I have a custom
I am working with an app that uses spring-security 3.0 and oauth2 using spring-security-oauth-1.0.0.M3.
I have working registration script the only problem is that i do not know
I'm working on an Android application that has several Activities. In it I have
I have this in my applicationContext.xml <bean class=org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter /> <mvc:annotation-driven conversion-service=conversionService/> <bean id=conversionService class=org.springframework.context.support.ConversionServiceFactoryBean>
Right now I have one bean with a @Scheduled method working fine; it's declared
I have working script that the user completes inputs on a form and when
I have working code I developed for a linux server that when I have
So I have working code that animates a BG image via a plugin. This

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.