Upload Imagem Vraptor 2

13:59:38,567 DEBUG [VRaptor ] VRaptor received a new request 13:59:38,576 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor 13:59:38,576 DEBUG [DefaultResourceTranslator] trying to access /produtos/4/imagem 13:59:38,576 DEBUG [VRaptorRequest ] Setting produto.id with [4] 13:59:38,576 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)] 13:59:38,583 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor 13:59:38,597 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor Servlet3MultipartInterceptor 13:59:38,598 INFO [Servlet3MultipartInterceptor] Request contains multipart data. Try to parse with Servlet3 Part 13:59:38,599 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor 13:59:38,601 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor 13:59:38,611 DEBUG [IogiParametersProvider] IogiParametersProvider is up 13:59:38,615 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor 13:59:38,616 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem] 13:59:38,616 DEBUG [IogiParametersProvider] getParametersFor() called with parameters Parameters(Parameter(produto.id -> 4)) and targets [Target(name=produto, type=class br.com.caelum.goodbuy.modelo.Produto), Target(name=imagem, type=interface br.com.caelum.vraptor.interceptor.multipart.UploadedFile)]. 13:59:38,616 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for Produto() as [] 13:59:38,618 WARN [UploadedFileConverter] There was an error when uploading the file {}. [color=red]Please verify if commons-fileupload jars are in your classpath or you are using a Servlet 3 Container.[/color] 13:59:38,618 DEBUG [ParametersInstantiatorInterceptor] There are conversion errors: [ValidationMessage{category=imagem, message=Invalid upload, parameters=null}] 13:59:38,618 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)] are [Produto: null ,Descrição: null , Preço: null, null] 13:59:38,620 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor 13:59:38,620 DEBUG [ExecuteMethodInterceptor] Invoking ImagensController.upload(Produto, UploadedFile) 13:59:38,620 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem] 13:59:38,629 DEBUG [CglibProxifier ] a proxy for interface br.com.caelum.vraptor.view.LogicResult is created as class br.com.caelum.vraptor.view.LogicResult$$EnhancerByCGLIB$$36226ac7 13:59:38,629 DEBUG [DefaultLogicResult ] redirecting to class ProdutosController 13:59:38,630 DEBUG [CglibProxifier ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$299aa61c 13:59:38,630 DEBUG [CglibProxifier ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$299aa61c 13:59:38,631 DEBUG [DefaultLogicResult ] redirecting to /Apostila_FJ-28/produtos/4 13:59:38,631 DEBUG [VRaptor ] VRaptor ended the request 13:59:38,647 DEBUG [VRaptor ] VRaptor received a new request 13:59:38,653 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor 13:59:38,653 DEBUG [DefaultResourceTranslator] trying to access /produtos/4 13:59:38,653 DEBUG [VRaptorRequest ] Setting id with [4] 13:59:38,654 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)] 13:59:38,660 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor 13:59:38,673 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor 13:59:38,674 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor ####################### Requisitando uma Sessão para a fabrica de Sessões... ####################### ####################### Abrindo Sessão do hibernate... ####################### ####################### Requisitando uma Sessão para a fabrica de Sessões... ####################### ####################### Pegando uma Sessão do hibernate... ####################### 13:59:38,690 DEBUG [IogiParametersProvider] IogiParametersProvider is up 13:59:38,694 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor 13:59:38,694 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)] are [4] 13:59:38,698 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor 13:59:38,698 DEBUG [ExecuteMethodInterceptor] Invoking ProdutosController.edita(Long) Metodo carrega() 13:59:38,702 DEBUG [LazyInterceptorHandler] Invoking interceptor OutjectResult Hibernate: select produto0_.id as id0_0_, produto0_.descricao as descricao0_0_, produto0_.nome as nome0_0_, produto0_.preco as preco0_0_ from Produto produto0_ where produto0_.id=? 13:59:38,704 DEBUG [OutjectResult ] outjecting produto=Produto: Celular Galaxy S3 ,Descrição: Celular de ultima geração , Preço: 2.0 13:59:38,706 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ForwardToDefaultViewInterceptor 13:59:38,706 DEBUG [ForwardToDefaultViewInterceptor] forwarding to the dafault page for this logic 13:59:38,712 DEBUG [DefaultPageResult ] forwarding to /WEB-INF/jsp/produtos/edita.jsp 13:59:38,714 DEBUG [DefaultStaticContentHandler] Deferring request to container: /Apostila_FJ-28/WEB-INF/jsp/produtos/edita.jsp ####################### Fechando Sessão do hibernate... ####################### 13:59:38,722 DEBUG [VRaptor ] VRaptor ended the request
Assim eu ja coloquei no classpath esse arquivo e estou usando o tomcat 7 ? e continua dando o mesmo erro?

Assim no edita tenho dois forms que direcionam para a mesma action , porem qdo eu somente altero as informações do produto ele altera as informações, sera que num é so colacar tudo no mesmo form?!

13:59:38,598 INFO [Servlet3MultipartInterceptor] Request contains multipart data. Try to parse with Servlet3 Part

ele tá usando o servlet3Upload, que não funciona no tomcat 7… vc colocou o commons-fileupload na pasta WEB-INF/lib?

Sim eu coloquei!

aopalliance.jar aspectjrt.jar cglib-nodep-2.1_3.jar commons-collections-3.1.jar commons-collections-3.2.1.jar commons-fileupload-1.2.1-sources.jar commons-io-1.4.jar commons-logging.jar dom4j-1.6.1.jar guava-r07.jar hamcrest-all-1.2RC3.jar hibernate3.jar hibernate-commons-annotations-3.2.0.Final.jar hibernate-core-3.6.0.Final.jar hibernate-jpa-2.0-api-1.0.0.Final.jar hibernate-validator-4.1.0.Final.jar iogi-0.9.1.jar javassist-3.12.0.GA.jar javassist-3.14.0.GA.jar jstl-api-1.2.jar jstl-impl-1.2.jar jta-1.1.jar log4j-1.2.16.jar mirror-1.5.1.jar mysql-connector-java-5.1.7-bin.jar objenesis-1.1.jar org.springframework.aop-3.0.5.RELEASE.jar org.springframework.asm-3.0.5.RELEASE.jar org.springframework.aspects-3.0.5.RELEASE.jar org.springframework.beans-3.0.5.RELEASE.jar org.springframework.context-3.0.5.RELEASE.jar org.springframework.core-3.0.5.RELEASE.jar org.springframework.expression-3.0.5.RELEASE.jar org.springframework.web-3.0.5.RELEASE.jar paranamer-2.2.jar postgresql-9.1-902.jdbc4.jar scannotation-1.0.3.jar slf4j-api-1.6.1.jar slf4j-log4j12-1.6.1.jar validation-api-1.0.0.GA.jar vraptor-3.4.1.jar xstream-1.3.1.jar

essas sãoas libs que tenho

Cara eu conferi exatamente como esta na apostila , e mesmo assim não funciona eu achei o fj21 no github , vc sabe me dizer se tem esse projeto da apostila em algum lugar pra eu conferir?

commons-fileupload-1.2.1-sources.jar

vc colocou o jar dos códigos fonte :wink:

Cara num sei não é somente esse que precisa?

não… qdo o jar está com -sources.jar, são só os codigos fonte, pra vc linkar na IDE e ela mostrar o código qdo vc der ctrl+clique nas classes.

qdo o jar está com -javadoc.jar, é só a documentação…

vc precisa do jar que esteja:

commons-fileupload-x.y.z.jar, onde x, y e z são a versão.

copie esses pro seu projeto:
https://github.com/caelum/vraptor/tree/master/vraptor-core/lib/optional/upload

Lucas , no console apareceu isso

[code]14:53:46,763 DEBUG [VRaptor ] VRaptor received a new request
14:53:46,772 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
14:53:46,772 DEBUG [DefaultResourceTranslator] trying to access /produtos/18/imagem
14:53:46,772 DEBUG [VRaptorRequest ] Setting produto.id with [18]
14:53:46,772 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)]
14:53:46,789 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor Servlet3MultipartInterceptor
14:53:46,789 INFO [Servlet3MultipartInterceptor] Request contains multipart data. Try to parse with Servlet3 Part
14:53:46,918 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
14:53:46,921 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
14:53:46,922 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
14:53:46,933 DEBUG [IogiParametersProvider] IogiParametersProvider is up
14:53:46,937 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
14:53:46,938 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
14:53:46,939 DEBUG [IogiParametersProvider] getParametersFor() called with parameters Parameters(Parameter(produto.id -> 18)) and targets [Target(name=produto, type=class br.com.caelum.goodbuy.modelo.Produto), Target(name=imagem, type=interface br.com.caelum.vraptor.interceptor.multipart.UploadedFile)].
14:53:46,939 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for Produto() as []
14:53:46,943 WARN [UploadedFileConverter] There was an error when uploading the file {}. Please verify if commons-fileupload jars are in your classpath or you are using a Servlet 3 Container.
14:53:46,943 DEBUG [ParametersInstantiatorInterceptor] There are conversion errors: [ValidationMessage{category=imagem, message=Invalid upload, parameters=null}]
14:53:46,943 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)] are [Produto: null
,Descrição: null
, Preço: null, null]
14:53:46,945 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
14:53:46,945 DEBUG [ExecuteMethodInterceptor] Invoking ImagensController.upload(Produto, UploadedFile)
14:53:46,945 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
14:53:46,952 DEBUG [CglibProxifier ] a proxy for interface br.com.caelum.vraptor.view.LogicResult is created as class br.com.caelum.vraptor.view.LogicResult$$EnhancerByCGLIB$$a0a061f9
14:53:46,952 DEBUG [DefaultLogicResult ] redirecting to class ProdutosController
14:53:46,953 DEBUG [CglibProxifier ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$94189d4e
14:53:46,953 DEBUG [CglibProxifier ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$94189d4e
14:53:46,953 DEBUG [DefaultLogicResult ] redirecting to /Apostila_FJ-28/produtos/18
14:53:46,954 DEBUG [VRaptor ] VRaptor ended the request
14:53:46,973 DEBUG [VRaptor ] VRaptor received a new request
14:53:46,981 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
14:53:46,981 DEBUG [DefaultResourceTranslator] trying to access /produtos/18
14:53:46,981 DEBUG [VRaptorRequest ] Setting id with [18]
14:53:46,981 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)]
14:53:46,997 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
14:53:47,000 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
14:53:47,001 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
####################### Requisitando uma Sessão para a fabrica de Sessões… #######################
####################### Abrindo Sessão do hibernate… #######################
####################### Requisitando uma Sessão para a fabrica de Sessões… #######################
####################### Pegando uma Sessão do hibernate… #######################
14:53:47,015 DEBUG [IogiParametersProvider] IogiParametersProvider is up
14:53:47,024 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
14:53:47,024 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)] are [18]
14:53:47,037 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
14:53:47,037 DEBUG [ExecuteMethodInterceptor] Invoking ProdutosController.edita(Long)
Metodo carrega()
14:53:47,040 DEBUG [LazyInterceptorHandler] Invoking interceptor OutjectResult
Hibernate:
select
produto0_.id as id0_0_,
produto0_.descricao as descricao0_0_,
produto0_.nome as nome0_0_,
produto0_.preco as preco0_0_
from
Produto produto0_
where
produto0_.id=?
14:53:47,042 DEBUG [OutjectResult ] outjecting produto=Produto: A Abóbora Mágica
,Descrição: Infantil

, Preço: 133.0
14:53:47,043 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ForwardToDefaultViewInterceptor
14:53:47,043 DEBUG [ForwardToDefaultViewInterceptor] forwarding to the dafault page for this logic
14:53:47,049 DEBUG [DefaultPageResult ] forwarding to /WEB-INF/jsp/produtos/edita.jsp
14:53:47,051 DEBUG [DefaultStaticContentHandler] Deferring request to container: /Apostila_FJ-28/WEB-INF/jsp/produtos/edita.jsp
####################### Fechando Sessão do hibernate… #######################
14:53:47,054 DEBUG [VRaptor ] VRaptor ended the request
[/code]

aopalliance.jar
aspectjrt.jar
cglib-nodep-2.1_3.jar
commons-collections-3.1.jar
commons-collections-3.2.1.jar
commons-fileupload-1.2.1.jar.zip
commons-fileupload-1.2.1-sources.jar
commons-io-1.3.2.jar.zip
commons-io-1.4.jar
commons-logging.jar
dom4j-1.6.1.jar
guava-r07.jar
hamcrest-all-1.2RC3.jar
hibernate3.jar
hibernate-commons-annotations-3.2.0.Final.jar
hibernate-core-3.6.0.Final.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-validator-4.1.0.Final.jar
iogi-0.9.1.jar
javassist-3.12.0.GA.jar
javassist-3.14.0.GA.jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
jta-1.1.jar
log4j-1.2.16.jar
mirror-1.5.1.jar
mysql-connector-java-5.1.7-bin.jar
objenesis-1.1.jar
org.springframework.aop-3.0.5.RELEASE.jar
org.springframework.asm-3.0.5.RELEASE.jar
org.springframework.aspects-3.0.5.RELEASE.jar
org.springframework.beans-3.0.5.RELEASE.jar
org.springframework.context-3.0.5.RELEASE.jar
org.springframework.core-3.0.5.RELEASE.jar
org.springframework.expression-3.0.5.RELEASE.jar
org.springframework.web-3.0.5.RELEASE.jar
paranamer-2.2.jar
postgresql-9.1-902.jdbc4.jar
scannotation-1.0.3.jar
slf4j-api-1.6.1.jar
slf4j-log4j12-1.6.1.jar
validation-api-1.0.0.GA.jar
vraptor-3.4.1.jar
xstream-1.3.1.jar

[/code]
ainda não funcionou,

A imagem "default.jpg " ele localiza , e renderiza na minha pagina, e agora eu coloquei uma imagem com o id do meu item de lista e renderizou tambem , mas quando vou selecionar pelo input ele da esse erro de invalid upload?

14:53:46,789 INFO [Servlet3MultipartInterceptor] Request contains multipart data. Try to parse with Servlet3 Part

ainda tá usando o servlet3Mulitpart… deveria usar o CommonsUploadMultipart…

faz o seguinte, verifique se os jars estão em WEB-INF/lib mesmo, dê um clean no projeto e no servidor, reinicie o servidor e tente de novo.

O lucas tem um topico que pesquisei “http://www.guj.com.br/java/275794-vraptor-erro-upload-de-arquivo” , em que O problema era o true
onde tiro isso?
porque ainda continua do mesmo jeito!

se vc está usando o maven, só copiar a dependência, sem o optional.

Lucas agradeço muito sua ajuda mas infelizmente eu não consegui , ate criei um novo projeto usando servlet 2.5 e não resolveu , mas eu vou tentar resolver de outra forma :slight_smile:
Mas assim vc sabe onde tem um exemplo de dowload e upload de arquivos com vraptor porque o da apostila não esta dando certo?

De quqlaquer forma muito obrigado!! :smiley:

lucas coloquei o Tomcat 6 e apareceu isso:


16:36:42,419 DEBUG [VRaptor             ] VRaptor received a new request
16:36:42,430 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
16:36:42,430 DEBUG [DefaultResourceTranslator] trying to access /produtos/4/imagem
16:36:42,431 DEBUG [VRaptorRequest      ] Setting produto.id with [4]
16:36:42,431 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)]
16:36:42,438 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
16:36:42,441 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
16:36:42,449 DEBUG [IogiParametersProvider] IogiParametersProvider is up
16:36:42,463 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
16:36:42,463 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
16:36:42,464 DEBUG [IogiParametersProvider] getParametersFor() called with parameters Parameters(Parameter(produto.id -> 4)) and targets [Target(name=produto, type=class br.com.caelum.goodbuy.modelo.Produto), Target(name=imagem, type=interface br.com.caelum.vraptor.interceptor.multipart.UploadedFile)].
16:36:42,464 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for Produto() as []
16:36:42,465  WARN [UploadedFileConverter] There was an error when uploading the file {}. Please verify if commons-fileupload jars are in your classpath or you are using a Servlet 3 Container.
16:36:42,466 DEBUG [ParametersInstantiatorInterceptor] There are conversion errors: [ValidationMessage{category=imagem, message=Invalid upload, parameters=null}]
16:36:42,466 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)] are [Produto: null
,Descrição: null
, Preço: null, null]
16:36:42,467 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
16:36:42,474 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
16:36:42,474 DEBUG [ExecuteMethodInterceptor] Invoking ImagensController.upload(Produto, UploadedFile)
16:36:42,474 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
16:36:42,481 DEBUG [CglibProxifier      ] a proxy for interface br.com.caelum.vraptor.view.LogicResult is created as class br.com.caelum.vraptor.view.LogicResult$$EnhancerByCGLIB$$50bf849e
16:36:42,481 DEBUG [DefaultLogicResult  ] redirecting to class ProdutosController
16:36:42,481 DEBUG [CglibProxifier      ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$4437bff3
16:36:42,482 DEBUG [CglibProxifier      ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$4437bff3
16:36:42,482 DEBUG [DefaultLogicResult  ] redirecting to /Vraptor/produtos/4
16:36:42,482 DEBUG [VRaptor             ] VRaptor ended the request
16:36:42,506 DEBUG [VRaptor             ] VRaptor received a new request
16:36:42,512 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
16:36:42,513 DEBUG [DefaultResourceTranslator] trying to access /produtos/4
16:36:42,513 DEBUG [VRaptorRequest      ] Setting id with [4]
16:36:42,513 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)]
16:36:42,518 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
16:36:42,521 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
16:36:42,527 DEBUG [IogiParametersProvider] IogiParametersProvider is up
16:36:42,553 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
16:36:42,553 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)] are [4]
16:36:42,555 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
####################### Requisitando uma Sessão para a fabrica de Sessões... #######################
####################### Abrindo Sessão do hibernate... #######################
####################### Requisitando uma Sessão para a fabrica de Sessões... #######################
####################### Pegando uma Sessão do hibernate... #######################
16:36:42,564 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
16:36:42,564 DEBUG [ExecuteMethodInterceptor] Invoking ProdutosController.edita(Long)
Metodo carrega()
16:36:42,566 DEBUG [LazyInterceptorHandler] Invoking interceptor OutjectResult
Hibernate: 
    select
        produto0_.id as id0_0_,
        produto0_.descricao as descricao0_0_,
        produto0_.nome as nome0_0_,
        produto0_.preco as preco0_0_ 
    from
        Produto produto0_ 
    where
        produto0_.id=?
16:36:42,567 DEBUG [OutjectResult       ] outjecting produto=Produto: Celular Galaxy S3
,Descrição: Celular de ultima geração
, Preço: 2.0
16:36:42,568 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ForwardToDefaultViewInterceptor
16:36:42,568 DEBUG [ForwardToDefaultViewInterceptor] forwarding to the dafault page for this logic
16:36:42,574 DEBUG [DefaultPageResult   ] forwarding to /WEB-INF/jsp/produtos/edita.jsp
16:36:42,575 DEBUG [DefaultStaticContentHandler] Deferring request to container: /Vraptor/WEB-INF/jsp/produtos/edita.jsp 
####################### Fechando Sessão do hibernate... #######################
16:36:42,577 DEBUG [VRaptor             ] VRaptor ended the request

se vc está usando o maven, coloque isso no pom.xml, na parte de dependencies:

<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
			<version>1.2.1</version>
		</dependency>
		<dependency>
		    <groupId>org.apache.commons</groupId>
		    <artifactId>commons-io</artifactId>
		    <version>1.3.2</version>
		</dependency>

daí mande baixar as dependências (plugin do maven pro eclipse, ou mvn ecilpse:eclipse pela linha de comando)

verifique se o commons-fileupload foi pro classpath, e tente subir o servidor.

Lucas , recriei um projeto usando o plugin do eclipse , adicionei as dependencias no pom.xml, conferi as dependencias la no maven dependencies esta la os arquivos, porem o resultado foi esse ;


18:58:05,922 DEBUG [VRaptor             ] VRaptor received a new request
18:58:05,931 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
18:58:05,932 DEBUG [DefaultResourceTranslator] trying to access /produtos/4/imagem
18:58:05,932 DEBUG [VRaptorRequest      ] Setting produto.id with [4]
18:58:05,932 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)]
18:58:05,937 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
18:58:05,943 DEBUG [IogiParametersProvider] IogiParametersProvider is up
18:58:05,954 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
18:58:05,955 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
18:58:05,955 DEBUG [IogiParametersProvider] getParametersFor() called with parameters Parameters(Parameter(produto.id -> 4)) and targets [Target(name=produto, type=class br.com.caelum.goodbuy.modelo.Produto), Target(name=imagem, type=interface br.com.caelum.vraptor.interceptor.multipart.UploadedFile)].
18:58:05,955 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for Produto() as []
18:58:05,957  WARN [UploadedFileConverter] There was an error when uploading the file {}. Please verify if commons-fileupload jars are in your classpath or you are using a Servlet 3 Container.
18:58:05,958 DEBUG [ParametersInstantiatorInterceptor] There are conversion errors: [ValidationMessage{category=imagem, message=Invalid upload, parameters=null}]
18:58:05,958 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ImagensController.uploadImagensController.upload(Produto, UploadedFile)] are [Produto: null
,Descrição: null
, Preço: null, null]
18:58:05,959 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
18:58:05,965 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
18:58:05,968 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
18:58:05,968 DEBUG [ExecuteMethodInterceptor] Invoking ImagensController.upload(Produto, UploadedFile)
18:58:05,968 DEBUG [ParanamerNameProvider] Found parameter names with paranamer for ImagensController.upload(Produto, UploadedFile) as [produto, imagem]
18:58:05,975 DEBUG [CglibProxifier      ] a proxy for interface br.com.caelum.vraptor.view.LogicResult is created as class br.com.caelum.vraptor.view.LogicResult$$EnhancerByCGLIB$$9759fa9b
18:58:05,975 DEBUG [DefaultLogicResult  ] redirecting to class ProdutosController
18:58:05,975 DEBUG [CglibProxifier      ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$8ad235f0
18:58:05,975 DEBUG [CglibProxifier      ] a proxy for class br.com.caelum.goodbuy.controller.ProdutosController is created as class br.com.caelum.goodbuy.controller.ProdutosController$$EnhancerByCGLIB$$8ad235f0
18:58:05,975 DEBUG [DefaultLogicResult  ] redirecting to /Vraptor/produtos/4
18:58:05,976 DEBUG [VRaptor             ] VRaptor ended the request
18:58:05,995 DEBUG [VRaptor             ] VRaptor received a new request
18:58:06,004 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ResourceLookupInterceptor
18:58:06,004 DEBUG [DefaultResourceTranslator] trying to access /produtos/4
18:58:06,004 DEBUG [VRaptorRequest      ] Setting id with [4]
18:58:06,004 DEBUG [DefaultResourceTranslator] found resource [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)]
18:58:06,009 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor FlashInterceptor
18:58:06,015 DEBUG [IogiParametersProvider] IogiParametersProvider is up
18:58:06,053 DEBUG [LazyInterceptorHandler] Invoking interceptor ParametersInstantiatorInterceptor
18:58:06,054 DEBUG [ParametersInstantiatorInterceptor] Parameter values for [DefaultResourceMethod: ProdutosController.editaProdutosController.edita(Long)] are [4]
18:58:06,056 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor InstantiateInterceptor
####################### Requisitando uma Sessão para a fabrica de Sessões... #######################
####################### Abrindo Sessão do hibernate... #######################
####################### Requisitando uma Sessão para a fabrica de Sessões... #######################
####################### Pegando uma Sessão do hibernate... #######################
18:58:06,071 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExceptionHandlerInterceptor
18:58:06,074 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ExecuteMethodInterceptor
18:58:06,074 DEBUG [ExecuteMethodInterceptor] Invoking ProdutosController.edita(Long)
Metodo carrega()
18:58:06,076 DEBUG [LazyInterceptorHandler] Invoking interceptor OutjectResult
Hibernate: 
    select
        produto0_.id as id0_0_,
        produto0_.descricao as descricao0_0_,
        produto0_.nome as nome0_0_,
        produto0_.preco as preco0_0_ 
    from
        Produto produto0_ 
    where
        produto0_.id=?
18:58:06,078 DEBUG [OutjectResult       ] outjecting produto=Produto: Celular Galaxy S3
,Descrição: Celular de ultima geração
, Preço: 2.0
18:58:06,081 DEBUG [ToInstantiateInterceptorHandler] Invoking interceptor ForwardToDefaultViewInterceptor
18:58:06,082 DEBUG [ForwardToDefaultViewInterceptor] forwarding to the dafault page for this logic
18:58:06,088 DEBUG [DefaultPageResult   ] forwarding to /WEB-INF/jsp/produtos/edita.jsp
18:58:06,089 DEBUG [DefaultStaticContentHandler] Deferring request to container: /Vraptor/WEB-INF/jsp/produtos/edita.jsp 
####################### Fechando Sessão do hibernate... #######################
18:58:06,092 DEBUG [VRaptor             ] VRaptor ended the request

o pom esta assim;

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>vraptor-scaffold</groupId>
	<artifactId>vraptor-scaffold</artifactId>
	<packaging>war</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>vraptor-scaffold</name>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<outputDirectory>${basedir}/src/main/webapp/WEB-INF/classes</outputDirectory>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<downloadJavadocs>true</downloadJavadocs>
					<wtpversion>2.0</wtpversion>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
			</plugin>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<version>6.1.14</version>
				<configuration>
					<scanIntervalSeconds>3</scanIntervalSeconds>
					<stopKey>foo</stopKey>
					<stopPort>9999</stopPort>
					<webAppConfig>
						<contextPath>/</contextPath>
					</webAppConfig>
				</configuration>
			</plugin>
		</plugins>
	</build>
  <dependencies>
  <dependency>
			<groupId>br.com.caelum</groupId>
			<artifactId>vraptor</artifactId>
			<version>3.4.0</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>
  <dependency>  
            <groupId>commons-fileupload</groupId>  
            <artifactId>commons-fileupload</artifactId>  
            <version>1.2.1</version>  
        </dependency>  
        <dependency>  
            <groupId>org.apache.commons</groupId>  
            <artifactId>commons-io</artifactId>  
            <version>1.3.2</version>  
        </dependency> 
	</dependencies>
</project>

o pom está correto… vc rodou o maven pra ele baixar as dependências?

Lucas , o problema esta na vcersão do commons-fileupload que estava desatualizada!! foi so trocar pela 1.2.2, O Aniche que me ajudou tambem !! :stuck_out_tongue:
Muito obrigado mesmo pela ajuda de vcs!! Abrço