dan0
Aug 4th, 2010, 10:13 AM
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?
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://192.168.0.121/facility"/>
<property name="username" value="xxxxx"/>
<property name="password" value="xxxxx"/>
</bean>
<bean id="customJdbcDaoImpl" class="com.facility.web.security.CustomJdbcDaoImpl" depends-on="dataSource">
<property name="dataSource" ref="dataSource"/>
</bean>
Note: JdbcDaoImpl has it's own dataSource and jdbcTemplate properties and getters/setters
public class CustomJdbcDaoImpl extends org.springframework.security.core.userdetails.jdbc .JdbcDaoImpl; {
...
}
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?
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://192.168.0.121/facility"/>
<property name="username" value="xxxxx"/>
<property name="password" value="xxxxx"/>
</bean>
<bean id="customJdbcDaoImpl" class="com.facility.web.security.CustomJdbcDaoImpl" depends-on="dataSource">
<property name="dataSource" ref="dataSource"/>
</bean>
Note: JdbcDaoImpl has it's own dataSource and jdbcTemplate properties and getters/setters
public class CustomJdbcDaoImpl extends org.springframework.security.core.userdetails.jdbc .JdbcDaoImpl; {
...
}