Injeção de Dependências com VRaptor

Pessoal, estava estudando a apostila FJ28 da caelum e me deparei com o seguinte erro de dependencia listado abaixo. O erro persiste mesmo quando utilizo a annotation @Component, do pacote br.com.caelum.vraptor.ioc.Component;, no DAO.
Estou utilizando as seguintes classes: Produto (@Entity), ProdutosController (@Resource) e ProdutoDAO (@Component).
Se alguém puder ajudar agradeceria bastante.

[code]org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘produtosController’ defined in file [C:\Users\Freitas\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\apostila\WEB-INF\classes\br\com\caelum\vraptor\controllers\ProdutosController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.caelum.vraptor.DAO.ProdutoDAO]: : Error creating bean with name ‘produtoDAO’ defined in file [C:\Users\Freitas\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\apostila\WEB-INF\classes\br\com\caelum\vraptor\DAO\ProdutoDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.vraptor.DAO.ProdutoDAO]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/Session; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘produtoDAO’ defined in file [C:\Users\Freitas\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\apostila\WEB-INF\classes\br\com\caelum\vraptor\DAO\ProdutoDAO.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [br.com.caelum.vraptor.DAO.ProdutoDAO]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/Session
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:698)
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)

/Mais um bocado de linha aqui…/

root cause

java.lang.ClassNotFoundException: org.hibernate.Session
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1666)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1511)
br.com.caelum.vraptor.DAO.ProdutoDAO.(ProdutoDAO.java:18)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:72)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:938)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:890)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:328)
org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:189)
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:820)
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:762)
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:680)
org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:771)
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:691)
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:192)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:984)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:886)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:479)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:450)
org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:328)
org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:385)
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:375)
org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1069)
org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:221)
br.com.caelum.vraptor.ioc.spring.VRaptorApplicationContext.getBean(VRaptorApplicationContext.java:242)
br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.instanceFor(SpringBasedContainer.java:59)
br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:41)
br.com.caelum.vraptor.core.InstantiatedInterceptorHandler.execute(InstantiatedInterceptorHandler.java:47)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
br.com.caelum.vraptor.interceptor.InterceptorListPriorToExecutionExtractor.intercept(InterceptorListPriorToExecutionExtractor.java:46)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:81)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:67)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:65)
br.com.caelum.vraptor.core.DefaultRequestExecution.execute(DefaultRequestExecution.java:70)
br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:56)
br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)[/code]

você importou os jars do Hibernate?

Foi importado o pacote Hibernate-annotations 3.4.0GA. O VRaptor é quem deveria se encarregar de criar a injeção de dependências instanciando o DAO, mas parece que isto nao está acontecendo. Parei na página 51 da apostila fj28 e um poco depois, na página 54, ela informa que um erro parecido com o meu ocorreria e que poderia ser resolvido utilizando a annotation @Component

o VRaptor faz a injeção de dependências… mas se vc não tem os jars não adianta.

Vc precisa ter o jar do hibernate-annotations e o do hibernate core (se vc tem o zip do VRaptor, na pasta lib/optional, os jars são o hibernate-3.3.2.jar e hibernate-annotations-3.4.0.jar)

Mesmo depois de ter importado tanto o hibernate-annotations e o hibernate-core o mesmo erro persiste sempre que tento acessar qualquer método de ProdutosController. Abaixo estão os códigos das classes:

ProdutosController

[code]
package br.com.caelum.vraptor.controllers;

import java.util.List;

import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.DAO.ProdutoDAO;
import br.com.caelum.vraptor.entidades.Produto;

@Resource
public class ProdutosController {

private final ProdutoDAO dao;

public ProdutosController(ProdutoDAO dao){
	this.dao = dao;
}

public void index(){
	
}

public List<Produto> lista(){
	return dao.listaTudo();
}

}[/code]

ProdutoDAO

[code]package br.com.caelum.vraptor.DAO;

import java.util.List;

import org.hibernate.Session;
import org.hibernate.Transaction;

import br.com.caelum.vraptor.entidades.Produto;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class ProdutoDAO {

private final Session session;

public ProdutoDAO(){
	this.session = CriadorDeSession.getSession();
}

public void salvar(Produto produto){
	
	Transaction tx = session.beginTransaction();
	session.save(produto);
	tx.commit();
	
}

public List<Produto> listaTudo(){
	
	return this.session.createCriteria(Produto.class).list();

}

}[/code]

CriadorDeSession

[code]package br.com.caelum.vraptor.DAO;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;

import br.com.caelum.vraptor.ioc.Component;

@Component
public class CriadorDeSession {

public static Session getSession(){
	
	AnnotationConfiguration configuration = new AnnotationConfiguration();
	
	configuration.configure();
	
	SessionFactory factory = configuration.buildSessionFactory();
	
	Session session = factory.openSession();
	
	return session;
}

}[/code]

vc colocou os jars na pasta WEB-INF/lib? só importar no eclipse (ou netbeans) não adianta, tem que copiar pra essa pasta

Coloquei os arquivos na pasta /lib que você mencionou logo acima, e adivinha… o bendito erro continua. rsrsrsrs (rindo pra nao chorar).
Esta noite vou refazer os passos com os arquivos já inclusos e ver no que dá. Até agora não entendi o que está contecendo…

posta aqui a estrutura dos seus arquivos pra eu dar uma olhada