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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:16:11+00:00 2026-05-23T14:16:11+00:00

My controller contains the following annotation : @Resource(name=userService) private UserDetailsServiceImpl userService; and the service

  • 0

My controller contains the following annotation :

@Resource(name="userService")
private UserDetailsServiceImpl userService;

and the service itself has the following :

@Service("userService")
@Transactional
public class UserDetailsServiceImpl implements UserDetailsService {

    @Resource(name = "sessionFactory")
    private SessionFactory sessionFactory;

However I receive the following error on startup :

Injection of resource dependencies
failed; nested exception is
org.springframework.beans.factory.BeanNotOfRequiredTypeException:
Bean named ‘userDetailsServiceImpl’
must be of type
[myapp.service.UserDetailsServiceImpl], but was actually of
type [$Proxy19]

  • 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-23T14:16:11+00:00Added an answer on May 23, 2026 at 2:16 pm

    It should be

    @Resource(name="userService")
    private UserDetailsService userService;
    

    Spring uses the interface type to make dependency injection, not the implementation type

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

Sidebar

Related Questions

I have the following controller @Controller @RequestMapping(/project/view.html) public class ProjectViewController { private static final
i have defined a route culture/Controller/action/id... my controller contains following action.. [OutputCache(Duration=60*10)] public ActionResult
Given the following Model, public class A { public string Name { get; set;
One of my viewmodels contains reference to Service Controller. I've implemented the IDisposable on
My JSP contains the following snippet: <c:forEach items=${rulesForm.rules} var=rule varStatus=counter> <tr id=rules${counter.index} name=rules[${counter.index}]> rules
I use the following attribute to decorate my BaseController class. public class OutputCompressAttribute :
I have the following code in my controller: public ActionResult Details(int id) { var
I have currently the following routes: routes.IgnoreRoute({resource}.axd/{*pathInfo}); routes.IgnoreRoute({resource}.gif/{*pathInfo}); MvcRoute.MappUrl({controller}/{action}/{ID}) .WithDefaults(new { controller = home,
I have the following controller which contains a view: Lead.Controllers.UrlSearch = Ember.Object.extend init: ->
@Jonah pointed me to the following explanation he has provided: Question on View Controller's

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.