Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Brandy Steals](https://secure.gravatar.com/avatar/0c62f941a20d6ac7991d0961543fe257?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brandy Steals
Courses Plus Student 5,457 PointsBummer: ContactDao's findById method was not called
I am not sure what I am doing wrong. I looked in the forum and it appears my code matches up to what is expected. I am not sure if I have a spelling error or if I am missing something.
package com.teamtreehouse.contactmgr.service;
import com.teamtreehouse.contactmgr.model.Contact;
public interface ContactService {
Contact findById(Long id);
}
package com.teamtreehouse.contactmgr.service;
import com.teamtreehouse.contactmgr.dao.ContactDao;
import com.teamtreehouse.contactmgr.model.Contact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class ContactServiceImpl implements ContactService {
@Autowired
private ContactDao contactDao;
@Override
public Contact findById(Long id) {
return null;
}
}
2 Answers
![Livia Galeazzi](https://uploads.teamtreehouse.com/production/profile-photos/7058122/micro_Go_board_part.jpg)
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsYour findById method always returns null. For the second task, you need to change that by editing the method and making it call the findById method of the contactDao object.
![Brandy Steals](https://secure.gravatar.com/avatar/0c62f941a20d6ac7991d0961543fe257?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brandy Steals
Courses Plus Student 5,457 PointsThank You! That worked.