Can't seem to get FindById working in my project. It keeps giving the same error no matter what i try, it might be just something small but can't figure it out.
edit: added configbean.xml
RowMapper
public class CustDetailsRowMapper implements RowMapper<CustDetails> {
     CustDetails CustDetails;
    @Override
    public CustDetails mapRow(ResultSet rs, int rowNum) throws SQLException {
         CustDetails.setCustName(rs.getString("CUSTNAME"));
         CustDetails.setAddress(rs.getString("CUSTADDRESS"));
         CustDetails.setCustId(rs.getInt("CUSTID"));
        return CustDetails;
    }
DAO code:
@Repository 
public class CustDetailsDaoImplementation implements CustDetailsDAO {
    private JdbcTemplate jdbcTemplate; 
    @Override
    public CustDetails findById(int custId) {
        String sql = "Select * FROM CUSTOMERDETAILS WHERE CUSTID = ?";
        CustDetails custDetails = jdbcTemplate.queryForObject(sql, new CustDetailsRowMapper(), custId);
        return custDetails;
    }
Service code:
   public class CustDetailsServiceImplementation implements custDetailsService {
      @Autowired
      CustDetailsDAO custDetailsDAO;
    @Override
    public List<CustDetails> getAllCusts() {
        // TODO Auto-generated method stub
        return (List<CustDetails>) custDetailsDAO.findAll();
    }
    @Override
    public CustDetails getACustByItsId(int custId) {
        // TODO Auto-generated method stub
        return custDetailsDAO.findById(custId);
    }
MainApp:
public class MainApp {
  public static void main(String[] args) {
       ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("configBean.xml");
       custDetailsService CustDetailsService  = (custDetailsService) context.getBean("custDetailsServiceImplementation");
       System.out.println(CustDetailsService.getACustByItsId(1));
  }
Can't seem to fix this error below:
Exception in thread "main" java.lang.NullPointerException
    at ie.sean.dao.CustDetailsDaoImplementation.findById(CustDetailsDaoImplementation.java:26)
    at ie.sean.services.CustDetailsServiceImplementation.getACustByItsId(CustDetailsServiceImplementation.java:26)
    at ie.sean.domain.MainApp.main(MainApp.java:14)
configBean.xml code:
    <context:component-scan base-package="ie.sean" />
<jdbc:embedded-database id="dataSource" type="H2">
    <jdbc:script location="schema.sql" />
    <jdbc:script location="data.sql" />
</jdbc:embedded-database>
<bean id="JdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate"  autowire="byType" />
</beans>