não consigo configurar vRaptor 3?

se a linha essa:

dao.adiciona(projeto);  

provavelmente é o dao que tá null… como você está criando esse dao? recebendo no construtor?

Isso mesmo

o ProjetoDao tá assim:

package modelos;

import hibernate.HibernateUtil;

import java.util.List;

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

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

//@Component
public class ProjetoDao {

	
	private Session session;
	
	public ProjetoDao(){
		this.session = new HibernateUtil().getSession();
	}
	
	public void adiciona(Projeto p){
		Transaction tx = session.beginTransaction();
		session.save(p);
		tx.commit();
	}
	
	public void atualiza(Projeto p){
		Transaction tx = session.beginTransaction();
		session.update(p);
		tx.commit();
	}
	
	public void remove(Projeto p){
		Transaction tx = session.beginTransaction();
		session.delete(p);
		tx.commit();
	}
	
	@SuppressWarnings("unckecked")
	public List<Projeto> lista(){
		return session.createCriteria(Projeto.class).list();
	}
}

e no controller, quem cria o dao? você recebe no construtor?

isso mesmo

package Controller;

import java.util.List;

import modelos.Projeto;
import modelos.ProjetoDao;
import br.com.caelum.vraptor.Resource;
import br.com.caelum.vraptor.Result;

@Resource
public class ProjetoController {

	private ProjetoDao dao;

	public ProjetoController() {

		this.dao = dao;

	}

	public void formulario() {
	}

	public void adiciona(Projeto projeto) {
		dao.adiciona(projeto);
	}

	public void atualiza(Projeto projeto) {
		dao.atualiza(projeto);
	}

	public void remove(Projeto projeto) {
		dao.remove(projeto);
	}

	public List<Projeto> lista() {
		System.out.println("isso é um teste");
		return dao.lista();
	}
}

aqui:

private ProjetoDao dao;  
  
    public ProjetoController() {  
  
        this.dao = dao;  
  
    }  

vc colocou o dao nele mesmo… precisa receber como parâmetro no construtor.

private ProjetoDao dao;  
  
    public ProjetoController(ProjetoDao dao) {  
  
        this.dao = dao;  
  
    }  

o eclipse deve até ter te dado um warning, às vezes é importante ver isso :wink:

Putz, agora eu tomei essa exception aqui

org.springframework.beans.factory.UnsatisfiedDependencyException

26/03/2012 16:10:38 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projetoController': Unsatisfied dependency expressed through constructor argument with index 0 of type [modelos.ProjetoDao]: : Error creating bean with name 'projetoDao': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [modelos.ProjetoDao]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class hibernate.HibernateUtil; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projetoDao': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [modelos.ProjetoDao]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class hibernate.HibernateUtil
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329)
	at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:263)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
	at br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.instanceFor(SpringBasedContainer.java:86)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:46)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:83)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:71)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:61)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:69)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.core.EnhancedRequestExecution.execute(EnhancedRequestExecution.java:44)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:58)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:679)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projetoDao': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [modelos.ProjetoDao]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class hibernate.HibernateUtil
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:965)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:898)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329)
	at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 42 more
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [modelos.ProjetoDao]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class hibernate.HibernateUtil
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:74)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:958)
	... 54 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class hibernate.HibernateUtil
	at modelos.ProjetoDao.<init>(ProjetoDao.java:19)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
	at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:126)
	... 56 more

deu algum pau na inicialização da classe HibernateUtil… deve estar no log de inicialização do servidor.

se vc está usa o VRaptor vc não precisa dessa classe, de qqer forma… vc pode registrar o pacote do hibernate e receber a Session direto no construtor do dao.
http://vraptor.caelum.com.br/documentacao/componentes-utilitarios-opcionais/

Man, eu to tentando usa o container do Spring, mas eu não sei como que eu configuro o VRaptor pra isso, e também não entendi o que eu tenho que coloca no CustomProvider, tem como dá uma esclarecida nisso ai???

vc não precisa configurar nada… basta ter os jars do spring no classpath…

vc não precisa do CustomProvider, só do context-param do packages com o valor do pacote do hibernate…

chegou a ler a apostila? http://www.caelum.com.br/curso/fj-28-vraptor-hibernate-ajax/

e fazer o curso? http://www.caelum.com.br/curso/online/vraptor/

Realmente eu não fiz o curso online, mas tava tentando acompanha a apostila quando deu todos esses erros . . . . . . . lendo a documentação mais atentamente eu percebi uns vacilos que eu tava cometendo por bobera . . . . . . vo rele tudo e i fazendo passo a passo

vlws :smiley:

Estou novamente com problemas . . . . . . eu recomecei meu projeto e acho que agora esta tudo certo, porém ocorrem erros quando tento starta o tomcat

abaixo está o erro e o meu web.xml

um help por favor

28/03/2012 13:36:56 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\Common Files\Business Objects\3.0\bin\NOTES\;C:\Program Files\Common Files\Business Objects\3.0\bin\NOTES\DATA\;C:\Program Files\Seagate Software\NOTES\;C:\Program Files\Seagate Software\NOTES\DATA\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Windows Live\Shared;C:\Program Files\Attachmate\EXTRA!\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Users\rmolnar\Rapha\java\eclipse;
28/03/2012 13:36:57 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:dashboard' did not find a matching property.
28/03/2012 13:36:57 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
28/03/2012 13:36:57 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
28/03/2012 13:36:57 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1646 ms
28/03/2012 13:36:57 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
28/03/2012 13:36:57 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
28/03/2012 13:36:58 org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [163] milliseconds.
13:37:00,451  INFO [BasicConfiguration  ] Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
13:37:00,534  INFO [DefaultSpringLocator] No application context found
13:37:00,823  INFO [WebAppBootstrapFactory] No static WebAppBootstrap found.
13:37:00,824  INFO [BasicConfiguration  ] br.com.caelum.vraptor.scanning = null
28/03/2012 13:37:00 org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception starting filter vraptor
java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
	at br.com.caelum.vraptor.scan.WebAppBootstrapFactory.create(WebAppBootstrapFactory.java:63)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.start(SpringProvider.java:83)
	at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:110)
	at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:103)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
28/03/2012 13:37:00 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error filterStart
28/03/2012 13:37:00 org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/dashboard] startup failed due to previous errors
28/03/2012 13:37:00 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
28/03/2012 13:37:00 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
28/03/2012 13:37:00 org.apache.catalina.startup.Catalina start
INFO: Server startup in 3236 ms
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	id="WebApp_ID" version="2.5">
	<display-name>dashboard</display-name>

	<!--
		VRaptor will scan classpath for all @Component and 
		@Resource inside WEB-INF/classes

		If you want to load them also from WEB-INF/lib/ jars, 
		you need to specify from which packages they will
		be loaded, comma separated:
	-->
	
	<!-- 
	<context-param>
        	<param-name>br.com.caelum.vraptor.packages</param-name>
	        <param-value>br.com.caelum.vraptor.blank</param-value>
    </context-param>
     -->
    
	<!--  
	   if you are using a servlet 3.0 container 
		as glassfish 3 or jetty 8, you dont need this
		filter configuration 
	-->
		
	<!-- <context-param>
        	<param-name>br.com.caelum.vraptor.provider</param-name>
	        <param-value>br.com.caelum.vraptor.ioc.guice.GuiceProvider</param-value>
    </context-param>-->
		
	<filter>
		<filter-name>vraptor</filter-name>
		<filter-class>br.com.caelum.vraptor.VRaptor</filter-class>
	</filter>

	<filter-mapping>
		<filter-name>vraptor</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>REQUEST</dispatcher>
	</filter-mapping>
</web-app>

java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V

geralmente é problema de versão de jar. vê se tem mais de um jar do slf4j (tem que ter um slf4j e um slf4j-log4j)

tem um só de cada . . . . . . será que pode ter alguma coisa a ver com a versão???

e essas partes, não tem problema??

13:37:00,451 INFO [BasicConfiguration ] Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
13:37:00,534 INFO [DefaultSpringLocator] No application context found
13:37:00,823 INFO [WebAppBootstrapFactory] No static WebAppBootstrap found.
13:37:00,824 INFO [BasicConfiguration ] br.com.caelum.vraptor.scanning = null

qual é a versão do slf4j que vc tá usando? tenta trocar a versão (ex usar a que vem com o vraptor)

a versão é essa ai, já era a mesma (slf4j-api-1.6.1.jar) mas eu subistitui todos os jars pelos que vem no vraptor, agora mudo o erro:

será incompatibilidade do log4j com a versão do hibernate??

o que eu acho estranho é ele não conseguir iniciar o contexto da aplicação

28/03/2012 14:41:10 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:/Program Files/Java/jre6/lib/i386;C:\Program Files\Common Files\Business Objects\3.0\bin\NOTES\;C:\Program Files\Common Files\Business Objects\3.0\bin\NOTES\DATA\;C:\Program Files\Seagate Software\NOTES\;C:\Program Files\Seagate Software\NOTES\DATA\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Lenovo\Bluetooth Software\;C:\Program Files\Windows Live\Shared;C:\Program Files\Attachmate\EXTRA!\;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Users\rmolnar\Rapha\java\eclipse;
28/03/2012 14:41:10 org.apache.tomcat.util.digester.SetPropertiesRule begin
AVISO: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:dashboard' did not find a matching property.
28/03/2012 14:41:10 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
28/03/2012 14:41:10 org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
28/03/2012 14:41:10 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 706 ms
28/03/2012 14:41:10 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
28/03/2012 14:41:10 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
28/03/2012 14:41:11 org.apache.catalina.core.StandardContext filterStart
GRAVE: Exception starting filter vraptor
java.lang.IncompatibleClassChangeError: Class org.apache.log4j.Logger does not implement the requested interface org.slf4j.Logger
	at br.com.caelum.vraptor.config.BasicConfiguration.getProvider(BasicConfiguration.java:71)
	at br.com.caelum.vraptor.VRaptor.init(VRaptor.java:103)
	at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4638)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5294)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
28/03/2012 14:41:11 org.apache.catalina.core.StandardContext startInternal
GRAVE: Error filterStart
28/03/2012 14:41:11 org.apache.catalina.core.StandardContext startInternal
GRAVE: Context [/dashboard] startup failed due to previous errors
28/03/2012 14:41:11 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
28/03/2012 14:41:11 org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
28/03/2012 14:41:11 org.apache.catalina.startup.Catalina start
INFO: Server startup in 942 ms

precisa fazer a mesma coisa pros jars do log4j

man, não tem jeito . . . . . . sempre que eu tendo acessa meu formulário ele dá erro e fala que não conaseguiu acha o bean da classe Session

to ficando doido já

eu procurei no findjar e eu tenho os jars ond vem essa classe =/

alguma sugestão???

olha a exception ai:

log4j:WARN No appenders could be found for logger (org.hibernate.validator.util.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
29/03/2012 13:40:04 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [default] in context with path [/dashboard] threw exception
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projetoController': Unsatisfied dependency expressed through constructor argument with index 0 of type [br.com.bdp.projeto.dao.ProjetoDao]: : Error creating bean with name 'projetoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projetoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329)
	at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:263)
	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1083)
	at br.com.caelum.vraptor.ioc.spring.SpringBasedContainer.instanceFor(SpringBasedContainer.java:86)
	at br.com.caelum.vraptor.interceptor.InstantiateInterceptor.intercept(InstantiateInterceptor.java:46)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.ExceptionHandlerInterceptor.intercept(ExceptionHandlerInterceptor.java:71)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.FlashInterceptor.intercept(FlashInterceptor.java:83)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.ResourceLookupInterceptor.intercept(ResourceLookupInterceptor.java:69)
	at br.com.caelum.vraptor.core.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:54)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.core.EnhancedRequestExecution.execute(EnhancedRequestExecution.java:44)
	at br.com.caelum.vraptor.VRaptor$1.insideRequest(VRaptor.java:92)
	at br.com.caelum.vraptor.ioc.spring.SpringProvider.provideForRequest(SpringProvider.java:58)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:89)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'projetoDao': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.Session]: : No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730)
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
	at org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329)
	at org.springframework.web.context.request.AbstractRequestAttributesScope.get(AbstractRequestAttributesScope.java:43)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:325)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 46 more
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hibernate.Session] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:920)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:789)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:795)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723)
	... 60 more

o meu Controller

package br.com.bdp.projeto.controller;

import java.util.List;

import br.com.bdp.projeto.dao.ProjetoDao;
import br.com.bdp.projeto.modelo.Projeto;
import br.com.caelum.vraptor.Resource;

@Resource
public class ProjetoController {

	private ProjetoDao dao;

	public ProjetoController(ProjetoDao dao) {

		this.dao = dao;

	}

	public void formulario() {
	}

	public void adiciona(Projeto projeto) {
		this.dao.adiciona(projeto);
	}

	public void atualiza(Projeto projeto) {
		dao.atualiza(projeto);
	}

	public void remove(Projeto projeto) {
		dao.remove(projeto);
	}

	public List<Projeto> lista() {
		System.out.println("isso é um teste");
		return dao.lista();
	}
}

E o meu Dao

package br.com.bdp.projeto.dao;

import java.util.List;

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

import br.com.bdp.projeto.modelo.Projeto;
import br.com.caelum.vraptor.ioc.Component;


@Component
public class ProjetoDao {

	
	private Session session;
	
	public ProjetoDao(Session session){
		this.session = session;
	}
	
	public void adiciona(Projeto p){
		Transaction tx = session.beginTransaction();
		session.save(p);
		tx.commit();
	}
	
	public void atualiza(Projeto p){
		Transaction tx = session.beginTransaction();
		session.update(p);
		tx.commit();
	}
	
	public void remove(Projeto p){
		Transaction tx = session.beginTransaction();
		session.delete(p);
		tx.commit();
	}
	
	@SuppressWarnings("unckecked")
	public List<Projeto> lista(){
		return session.createCriteria(Projeto.class).list();
	}
}

Blz, agora o problema é que não tem ninguém criando a Session do hibernate…

você pode criar um componente que faz isso, ou usar o que já vem com o VRaptor, no web.xml:

<context-param>
    <param-name>br.com.caelum.vraptor.packages</param-name>
    <param-value>br.com.caelum.vraptor.util.hibernate</param-value>
</context-param>

se já existir a configuração de packages, basta colocar os valores separados por vírgula

agora deu isso

GRAVE: Exception starting filter vraptor
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactoryCreator': Invocation of init method failed; nested exception is org.hibernate.HibernateException: /hibernate.cfg.xml not found
	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)

eu tava usando o persistence.xml

ele não funciona???

se tá usando o persistence.xml troca o hibernate por jpa no context-param