
Originally Posted by
karldmoore
If you put your code in [ code] [ /code] tags, it's sooooo much easier to read. You now need to extend JdbcDaoImpl and override the initMappingSqlQueries method.
Code:
/**
* Extension point to allow other MappingSqlQuery objects to be substituted in a subclass
*/
protected void initMappingSqlQueries() {
this.usersByUsernameMapping = new UsersByUsernameMapping(getDataSource());
this.authoritiesByUsernameMapping = new AuthoritiesByUsernameMapping(getDataSource());
}
Now I am one step ahead, everything is working fine now except one thing that is when I log in with correct username and password I get the following error message:
Code:
Reason: SQL 'SELECT LoginName, UserPassword, Email, FirstName, LastName FROM Users WHERE LoginName=?' requires 1 bind variables, but 0 variables were declared for this object; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: SQL 'SELECT LoginName, UserPassword, Email, FirstName, LastName FROM Users WHERE LoginName=?' requires 1 bind variables, but 0 variables were declared for this object