The moose likes Spring and the fly likes IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Spring
Reply Bookmark "IllegalArgumentException: Watch "IllegalArgumentException: New topic
Author

IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

Dan King
Ranch Hand

Joined: Mar 18, 2009
Posts: 81
I believe I've properly configured my data source, however, I continually get the following error:
Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required

Below is my bean declaration and class, anyone see what is/could be wrong?

Note: JdbcDaoImpl has it's own dataSource and jdbcTemplate properties and getters/setters
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 16624

So it seems to need a JDBCTemplate passed in to it, just like you did with the dataSource. Just create a bean with JDBCTemplate passing dataSource in to a contructor-arg. Then inject the jdbcTemplate into the UserDetailsService bean there.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
 
subject: IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required
 
Threads others viewed
Implementing Spring DAO concept in Struts MVC
DWR and JdbcTemplate
data source defined but not found..
Using SPRING hibernate and JDBC templates in the same DAO
Understand regarding REQUIRED and REQUIRES_NEW
IntelliJ Java IDE