File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Autowiring of data source not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Autowiring of data source not working" Watch "Autowiring of data source not working" New topic
Author

Autowiring of data source not working

Jehan Jaleel
Ranch Hand

Joined: Apr 30, 2002
Posts: 196
Hi,

I have a simple example where I have a Spring service bean that I want to use to query the DB (I know I should probably use a DAO but this is just an example), I have the following code...

Interface file...


Implementation file..


And in my Spring config file I have...



Right now this is giving exception...



Any suggestions?

Thanks.
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 381
First, have a check the location of the @Service annotation.
Should it be on interface or implementation?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Autowiring of data source not working
 
Similar Threads
Problem with the Sample Spring AOP application
Dependency Injection Problem.
JdbcTemplate and IllegalArgumentException
IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required
Error while Proxying DAO Classes