ola galera nao estou conseguindo que meu contrutor do controler instancie a classe DAO
olhe o meu codigo
@Entity
@Component
public class Cheque implements Serializable{
@Id
private int id;
@Temporal(javax.persistence.TemporalType.DATE)
private Date vencimento;
@Column(scale=2,precision=12)
private BigDecimal valor;
@Temporal(javax.persistence.TemporalType.DATE)
private Date diabaixa;
Meu DAO
@Component
public class ChequeDAO {
private Session session;
public ChequeDAO(Session session){
this.session = session;
}
public void salvar(Cheque cheque) throws Exception {
session.beginTransaction();
session.saveOrUpdate(cheque);
session.beginTransaction().commit();
}
Meu web.xml
<context-param>
<param-name>br.com.caelum.vraptor.provider</param-name>
<param-value>br.com.caelum.vraptor.util.hibernate.HibernateCustomProvider</param-value>
</context-param>
IndexController
@Resource
public class IndexController {
private Result result;
private Validator validator;
private Userinfo userinfo;
private ChequeDAO dao;
public IndexController(Result result,Validator validator,Userinfo userinfo,ChequeDAO dao){
this.result=result;
this.validator=validator;
this.userinfo=userinfo;
this.dao= dao;
}
Acontece esse erro na pagina