This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
expected single match bean but found two exception
Don boscoo
Greenhorn
Joined: Sep 20, 2010
Posts: 28
posted
0
Hi All,
I want to have two datasources for my application, one which connects to oracle and the other to sql server. I have them as two seperate xml files imported in the app-config.xml
Could not autowire method: public void com.pdfscan.disconnectOrders.ProductDetailsItemDaoImpl.setsqlDataSource(javax.sql.DataSource); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [javax.sql.DataSource] is defined: expected single matching bean but found 2: [dataSource, sqlDataSource]
Please help me resolving this.
Thanks.
Alexander Ryzhikov
Greenhorn
Joined: Mar 24, 2011
Posts: 1
posted
0
Hi,
can you show a part of code, where you use this declared bean?