Anotação @Component do VRaptor 3 não funciona

Olá pessoal,

Estou com um tempo livre e estou dando uma olhada no VRaptor, usando como base a apostila do curso FJ-28 da Caelum.
No exercício 10 do capítulo 7 é ensinado usar a anotação @Component no ProdutoDao para que esse seja injetado pelo Spring no ProdutoController, entretanto mesmo usando a anotação, o erro do Spring (que não consegue criar a dependência ProdutoDao em ProdutoController) persiste.

O que posso estar fazendo errado?

[]'s

Posta o stacktrace e os códigos.

Verifique se o web.xml está configurado corretamente, contendo as configurações do VRaptor:

    <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>

Verifique se o import está correto


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

@Component
public class ProdutoDao(){
    //....
}

cheque se o ProdutoController tem o atributo ProdutoDao adicionado no construtor corretamente.

ex.:


import br.com.caelum.vraptor.Resource;

@Resource
public class ProdutoController(){

    private final ProdutoDao produtoDao;

    public ProdutoController(ProdutoDao produtoDao){
        this.produtoDao = produtoDao;
    }

}

Confira os jars que você tem na pasta lib se estão corretos.

Maicon, está tudo ok, o VRaptor está configurado corretamente.
Está tudo igual à apostila e os outros exemplos estão funcionando.
O problema é a injeção.

raf4ever, segue o stack trace:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'produtosController': Unsatisfied dependency expressed through constructor argument with index 0 of type [dao.ProdutoDao]: : Error creating bean with name 'produtoDao': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [dao.ProdutoDao]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getEventListeners()Lorg/hibernate/event/EventListeners;; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'produtoDao': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [dao.ProdutoDao]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getEventListeners()Lorg/hibernate/event/EventListeners; org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:730) org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:196) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1003) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:907) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) org.springframework.beans.factory.support.AbstractBeanFactory$2.getObject(AbstractBeanFactory.java:329) ...

David, boa tarde!

Reproduzi o erro removendo a anotação @Component da classe ProdutoDao e também substituíndo o “import br.com.caelum.vraptor.ioc.Component;” por “import org.springframework.stereotype.Component;”.
Pode ser que esteja com algum outro problema, mas a principio veja novamente se está fazendo o import corretamente.
Eu percebi que você esta usando Hibernate, e é a única variação que encontrei entre seu exemplo e o meu código. Veja se não tem nenhum outro problema com a classe produtoDao onde a mesma nao consegue ser compilada ou qualquer outro problema no seu hibernate.cfg.xml.

Lembrando que a produtoDao tem que ficar com o import correto conforme exemplo abaixo:

import br.com.caelum.vraptor.ioc.Component;   
  
@Component   
public class ProdutoDao(){   
    //....   
} 

abs.

o noSuchMethodError geralmente é imcompatibilidade de versão de jars…

você está com mais de uma versão do hibernate no classpath? está fazendo o deploy da aplicação no jboss?

[quote=Lucas Cavalcanti]o noSuchMethodError geralmente é imcompatibilidade de versão de jars…

você está com mais de uma versão do hibernate no classpath? está fazendo o deploy da aplicação no jboss?[/quote]

Oi Lucas,

Estou com a versão 4.0 CR4 do Hibernate.
O problema é no Hibernate… Olhei com mais calma todo o Stack Trace e está dando problema na hora de criar a SessionFactory.
O engraçado é que se eu estar o Dao sem ser injetado pelo Spring, a sessão é criada normalmente. O problema só acontece quando o Spring tenta instanciar o Dao.
Enfim, hoje estou um pouco enrolado, mas amanhã vou trocar a versão para ver se resolvo o problema.

[]'s

mas tem outra lib do hibernate no classpath? o problema é que essa versão pode ser incompatível com o spring (a AnnotationConfiguration estava deprecated, e deve ter sido removida ou algo do tipo)

tenta usar o hibernate 3.6.x

[quote=Lucas Cavalcanti]mas tem outra lib do hibernate no classpath? o problema é que essa versão pode ser incompatível com o spring (a AnnotationConfiguration estava deprecated, e deve ter sido removida ou algo do tipo)

tenta usar o hibernate 3.6.x[/quote]

Oi Lucas,

Eu já mudei o código para usar a classe Configuration (que deve ser usada no lugar na AnnotationConfiguration) e mesmo assim o problema persistiu.
Vou tentar atualizar o Spring também para a versão compatível com o Hibernate 4.

[]'s

davidbuzatto, travei no mesmo exercício que você relata no inicio do seu post.
As diferenças são: estou usando JPA (implementação hibernate), deixei as classes de negócio (Produto, ProduoDao e etc…) em um outro projeto Java padrão, que chamo de base e no projeto web estou deixando coisas de view e apresentação (jsps, ProdutoController e etc…).
Todos os testes do projeto base estão passando.
Meu problema é a injeção do ProdutoDao no ProdutoController. Se eu instanciar ele diretamente, sem recebê-lo no construtor, ou copiar o pacote onde ProdutoDao está no projeto base para dentro do projeto web, para que ele seja injetado, tudo funciona perfeitamente.
Mas recebo o erro de injeção, se deixar ProdutoDao dentro do projeto base.
Todas as checagens que foram sugeridas aqui (principalmente as passadas pelo maiconkeller), eu já fiz.
Pelo o que analisei o Stack trace error, não é apresentado o problema com versão de .jar e eu já associei o projeto base em ?Project References? e em ?Deployment Assembly?.
Alguém tem alguma idéia do que mais posso fazer para tentar resolver o problema?
Segue stack do Tomcat:

05/12/2011 12:18:21 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:\java\SDK\jdk\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\DOCUME~1\THIAGO~1.SAN\CONFIG~1\Temp\java_ee_sdk-5_06-windows.exe2\package;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\java\SDK\jdk\bin;C:\Documents and Settings\thiago.santana\Meus documentos\sw\svn-win32-1.7.0\bin
05/12/2011 12:18:21 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:arcantus-web' did not find a matching property.
05/12/2011 12:18:22 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
05/12/2011 12:18:22 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 421 ms
05/12/2011 12:18:22 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
05/12/2011 12:18:22 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
0 [main] INFO  br.com.caelum.vraptor.config.BasicConfiguration - Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
31 [main] INFO  br.com.caelum.vraptor.ioc.spring.DefaultSpringLocator - No application context found
93 [main] INFO  br.com.caelum.vraptor.scan.WebAppBootstrapFactory - No static WebAppBootstrap found.
93 [main] INFO  br.com.caelum.vraptor.config.BasicConfiguration - br.com.caelum.vraptor.scanning = null
250 [main] INFO  org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Mon Dec 05 12:18:22 BRST 2011]; root of context hierarchy
437 [main] WARN  br.com.caelum.vraptor.core.BaseComponents - There is neither commons-fileupload nor servlet3 handlers registered. If you are willing to upload a file, please add the commons-fileupload in your classpath or use a Servlet 3 Container
484 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': replacing [Root bean: class [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [br.com.caelum.vraptor.ioc.spring.InjectionBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
578 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@22ce00: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,defaultRoutes,XStreamXMLDeserializer,defaultRouter,defaultResourceNotFoundHandler,pathAnnotationRoutesParser,hibernateProxyInitializer,objenesisProxifier,defaultRestDefaults,paranamerNameProvider,defaultResourceTranslator,defaultMethodNotAllowedHandler,noRoutesConfiguration,defaultTypeNameExtractor,defaultTypeFinder,defaultDeserializers,interceptorListPriorToExecutionExtractor,defaultMultipartConfig,defaultConverters,defaultInterceptorHandlerFactory,defaultAcceptHeaderToFormat,encodingHandlerFactory,topologicalSortedInterceptorRegistry,stereotypeHandler,converterHandler,interceptorStereotypeHandler,deserializesHandler,stereotypedBeansRegistrar,defaultSpringLocator,nullMultipartInterceptor,defaultValidationViewsFactory,resourceLookupInterceptor,defaultResult,defaultMethodInfo,defaultValidator,parametersInstantiatorInterceptor,XStreamJSONSerialization,applicationConfiguration,defaultFormatResolver,defaultPathResolver,forwardToDefaultViewInterceptor,XStreamJSONPSerialization,defaultPageResult,emptyResult,flashInterceptor,XStreamXMLSerialization,ognlParametersProvider,deserializingInterceptor,defaultRefererResult,jsonDeserializer,nullBeanValidator,defaultExceptionMapper,defaultHttpResult,jstlLocalization,HTMLSerialization,defaultStatus,defaultRestHeadersHandler,executeMethodInterceptor,defaultRepresentationResult,replicatorOutjector,exceptionHandlerInterceptor,outjectResult,instantiateInterceptor,emptyElementsRemoval,defaultLogicResult,downloadInterceptor,primitiveFloatConverter,primitiveBooleanConverter,bigDecimalConverter,primitiveCharConverter,stringConverter,primitiveByteConverter,localeBasedDateConverter,characterConverter,primitiveDoubleConverter,floatConverter,booleanConverter,longConverter,primitiveIntConverter,bigIntegerConverter,doubleConverter,primitiveShortConverter,primitiveLongConverter,uploadedFileConverter,integerConverter,enumConverter,byteConverter,shortConverter,localeBasedCalendarConverter,VRaptorRequestProvider,httpServletRequestProvider,httpServletResponseProvider,httpSessionProvider,enhancedRequestExecution,defaultInterceptorStack,org.springframework.aop.config.internalAutoProxyCreator,produtosController]; root of factory hierarchy
671 [main] INFO  br.com.caelum.vraptor.core.DefaultConverters - Registering bundled converters
765 [main] INFO  br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /produtos/lista                                   [ALL] -> ProdutosController.lista()
765 [main] INFO  br.com.caelum.vraptor.VRaptor - VRaptor 3.3.1 successfuly initialized
05/12/2011 12:18:23 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
05/12/2011 12:18:23 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
05/12/2011 12:18:23 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/79  config=null
05/12/2011 12:18:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1250 ms
05/12/2011 12:18:28 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'produtosController': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.apache.log4j.Logger]: : No matching bean of type [org.apache.log4j.Logger] 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.apache.log4j.Logger] 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.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.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:23)
	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:291)
	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:619)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.apache.log4j.Logger] 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)
	... 42 more

[quote=thiago-dev]davidbuzatto, travei no mesmo exercício que você relata no inicio do seu post.
As diferenças são: estou usando JPA (implementação hibernate), deixei as classes de negócio (Produto, ProduoDao e etc…) em um outro projeto Java padrão, que chamo de base e no projeto web estou deixando coisas de view e apresentação (jsps, ProdutoController e etc…).
Todos os testes do projeto base estão passando.
Meu problema é a injeção do ProdutoDao no ProdutoController. Se eu instanciar ele diretamente, sem recebê-lo no construtor, ou copiar o pacote onde ProdutoDao está no projeto base para dentro do projeto web, para que ele seja injetado, tudo funciona perfeitamente.
Mas recebo o erro de injeção, se deixar ProdutoDao dentro do projeto base.
Todas as checagens que foram sugeridas aqui (principalmente as passadas pelo maiconkeller), eu já fiz.
Pelo o que analisei o Stack trace error, não é apresentado o problema com versão de .jar e eu já associei o projeto base em ?Project References? e em ?Deployment Assembly?.
Alguém tem alguma idéia do que mais posso fazer para tentar resolver o problema?
Segue stack do Tomcat:

05/12/2011 12:18:21 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:\java\SDK\jdk\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\DOCUME~1\THIAGO~1.SAN\CONFIG~1\Temp\java_ee_sdk-5_06-windows.exe2\package;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Arquivos de programas\Windows Imaging\;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\java\SDK\jdk\bin;C:\Documents and Settings\thiago.santana\Meus documentos\sw\svn-win32-1.7.0\bin
05/12/2011 12:18:21 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:arcantus-web' did not find a matching property.
05/12/2011 12:18:22 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
05/12/2011 12:18:22 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 421 ms
05/12/2011 12:18:22 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
05/12/2011 12:18:22 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
0 [main] INFO  br.com.caelum.vraptor.config.BasicConfiguration - Using class br.com.caelum.vraptor.ioc.spring.SpringProvider as Container Provider
31 [main] INFO  br.com.caelum.vraptor.ioc.spring.DefaultSpringLocator - No application context found
93 [main] INFO  br.com.caelum.vraptor.scan.WebAppBootstrapFactory - No static WebAppBootstrap found.
93 [main] INFO  br.com.caelum.vraptor.config.BasicConfiguration - br.com.caelum.vraptor.scanning = null
250 [main] INFO  org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Refreshing Root WebApplicationContext: startup date [Mon Dec 05 12:18:22 BRST 2011]; root of context hierarchy
437 [main] WARN  br.com.caelum.vraptor.core.BaseComponents - There is neither commons-fileupload nor servlet3 handlers registered. If you are willing to upload a file, please add the commons-fileupload in your classpath or use a Servlet 3 Container
484 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Overriding bean definition for bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor': replacing [Root bean: class [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Root bean: class [br.com.caelum.vraptor.ioc.spring.InjectionBeanPostProcessor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null]
578 [main] INFO  org.springframework.beans.factory.support.DefaultListableBeanFactory - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@22ce00: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,defaultRoutes,XStreamXMLDeserializer,defaultRouter,defaultResourceNotFoundHandler,pathAnnotationRoutesParser,hibernateProxyInitializer,objenesisProxifier,defaultRestDefaults,paranamerNameProvider,defaultResourceTranslator,defaultMethodNotAllowedHandler,noRoutesConfiguration,defaultTypeNameExtractor,defaultTypeFinder,defaultDeserializers,interceptorListPriorToExecutionExtractor,defaultMultipartConfig,defaultConverters,defaultInterceptorHandlerFactory,defaultAcceptHeaderToFormat,encodingHandlerFactory,topologicalSortedInterceptorRegistry,stereotypeHandler,converterHandler,interceptorStereotypeHandler,deserializesHandler,stereotypedBeansRegistrar,defaultSpringLocator,nullMultipartInterceptor,defaultValidationViewsFactory,resourceLookupInterceptor,defaultResult,defaultMethodInfo,defaultValidator,parametersInstantiatorInterceptor,XStreamJSONSerialization,applicationConfiguration,defaultFormatResolver,defaultPathResolver,forwardToDefaultViewInterceptor,XStreamJSONPSerialization,defaultPageResult,emptyResult,flashInterceptor,XStreamXMLSerialization,ognlParametersProvider,deserializingInterceptor,defaultRefererResult,jsonDeserializer,nullBeanValidator,defaultExceptionMapper,defaultHttpResult,jstlLocalization,HTMLSerialization,defaultStatus,defaultRestHeadersHandler,executeMethodInterceptor,defaultRepresentationResult,replicatorOutjector,exceptionHandlerInterceptor,outjectResult,instantiateInterceptor,emptyElementsRemoval,defaultLogicResult,downloadInterceptor,primitiveFloatConverter,primitiveBooleanConverter,bigDecimalConverter,primitiveCharConverter,stringConverter,primitiveByteConverter,localeBasedDateConverter,characterConverter,primitiveDoubleConverter,floatConverter,booleanConverter,longConverter,primitiveIntConverter,bigIntegerConverter,doubleConverter,primitiveShortConverter,primitiveLongConverter,uploadedFileConverter,integerConverter,enumConverter,byteConverter,shortConverter,localeBasedCalendarConverter,VRaptorRequestProvider,httpServletRequestProvider,httpServletResponseProvider,httpSessionProvider,enhancedRequestExecution,defaultInterceptorStack,org.springframework.aop.config.internalAutoProxyCreator,produtosController]; root of factory hierarchy
671 [main] INFO  br.com.caelum.vraptor.core.DefaultConverters - Registering bundled converters
765 [main] INFO  br.com.caelum.vraptor.http.route.DefaultRouteBuilder - /produtos/lista                                   [ALL] -> ProdutosController.lista()
765 [main] INFO  br.com.caelum.vraptor.VRaptor - VRaptor 3.3.1 successfuly initialized
05/12/2011 12:18:23 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
05/12/2011 12:18:23 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
05/12/2011 12:18:23 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/79  config=null
05/12/2011 12:18:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 1250 ms
05/12/2011 12:18:28 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'produtosController': Unsatisfied dependency expressed through constructor argument with index 0 of type [org.apache.log4j.Logger]: : No matching bean of type [org.apache.log4j.Logger] 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.apache.log4j.Logger] 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.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.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:23)
	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:291)
	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:619)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.apache.log4j.Logger] 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)
	... 42 more

[/quote]

Resolvido;

Caso alguém passe pelo mesmo problema:

Basta cadastrar um componente opcional no web.xml e criar a devida classe de provider para registrar o ProdutoDao (que pode estar em outro projeto como no meu caso), todo o processo está detalhado na documentação do framework em:
http://vraptor.caelum.com.br/documentacao/componentes-utilitarios-opcionais/

Thiago Santana