Problema vraptor + restfulie [Resolvido]

Olá pessoal ,

Estou implementando pela primeira vez serviços rest utilizando vraptor no server + restfulie no client . Ate ai foi tranquila a implementação de ambos os lados, só que está gerando essa exception meio estranha do java assist

br.com.caelum.vraptor.InterceptionException: exception raised, check root cause for details: java.lang.IllegalStateException: Unable to extend type br.com.jslsolucoes.faturamento.model.Boleto
	at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:96)
	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.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:61)
	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.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:61)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.caelum.vraptor.interceptor.ParametersInstantiatorInterceptor.intercept(ParametersInstantiatorInterceptor.java:93)
	at br.com.caelum.vraptor.core.LazyInterceptorHandler.execute(LazyInterceptorHandler.java:59)
	at br.com.caelum.vraptor.core.DefaultInterceptorStack.next(DefaultInterceptorStack.java:54)
	at br.com.jslsolucoes.tagria.interceptor.ErrorInterceptor.intercept(ErrorInterceptor.java:54)
	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.InstantiateInterceptor.intercept(InstantiateInterceptor.java:48)
	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.ToInstantiateInterceptorHandler.execute(ToInstantiateInterceptorHandler.java:56)
	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.plugin.hibernate4.HibernateTransactionInterceptor.intercept(HibernateTransactionInterceptor.java:33)
	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:91)
	at br.com.caelum.vraptor.ioc.guice.GuiceProvider.provideForRequest(GuiceProvider.java:82)
	at br.com.caelum.vraptor.VRaptor.doFilter(VRaptor.java:88)
	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:225)
	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:999)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException: Unable to extend type br.com.jslsolucoes.faturamento.model.Boleto
	at br.com.caelum.restfulie.config.XStreamConfig.enhanceResource(XStreamConfig.java:166)
	at br.com.caelum.restfulie.config.XStreamConfig.create(XStreamConfig.java:68)
	at br.com.caelum.restfulie.EntryPointService.getSerializer(EntryPointService.java:127)
	at br.com.caelum.restfulie.EntryPointService.post(EntryPointService.java:110)
	at br.com.caelum.restfulie.EntryPointService.post(EntryPointService.java:82)
	at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:65)
	at br.com.jslsolucoes.tagria.repository.impl.PagamentoRepositoryImpl.generate(PagamentoRepositoryImpl.java:80)
	at br.com.jslsolucoes.tagria.repository.impl.AssinanteRepositoryImpl.save(AssinanteRepositoryImpl.java:122)
	at br.com.jslsolucoes.tagria.controller.AssinanteController.save(AssinanteController.java:90)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at br.com.caelum.vraptor.interceptor.ExecuteMethodInterceptor.intercept(ExecuteMethodInterceptor.java:61)
	... 53 more
Caused by: javassist.NotFoundException: br.com.jslsolucoes.faturamento.model.Boleto
	at javassist.ClassPool.get(ClassPool.java:440)
	at br.com.caelum.restfulie.config.XStreamConfig.enhanceResource(XStreamConfig.java:156)
	... 66 more

Na aplicação cliente que consome os serviços se eu rodo o método num “main” da vida roda normal funciona tudo certinho , só que quando tento rodar dentro da aplicação web cliente fica gerando essa exception ? Alguma luz ? Vi umas mensagens relativas a 2011 sobre um problema parecido de outro cara com algo relativo ao class loader onde o lucas pede pra iimprimir informações do class loader , ai sei la se ajuda , essas impressões.


System.out.println(javassist.NotFoundException.class.getClassLoader());
		System.out.println(getClass().getClassLoader());
		System.out.println(Boleto.class.getClassLoader());
WebappClassLoader
  context: /tagria
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@7f188439

WebappClassLoader
  context: /tagria
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@7f188439

WebappClassLoader
  context: /tagria
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader@7f188439

sabe dizer se tem outra versão do javassist no classpath? tipo na pasta lib/ do servidor ou coisa do tipo?

Entao não tem duas libs não lucas . Nem na lib do container no meu caso o tomcat 7 e nem na lib do projeto.
Está só a lib javassist-3.15.0-GA.jar no classpath . Precisa de alguma classe pra te ajudar ??

vc tá com quais versões do vraptor e do restfulie-client?

vraptor-3.4.1.jar e restfulie-java-client-1.0.0-beta-2.jar , creio ser as ultimas versões de ambos

http://mvnrepository.com/artifact/br.com.caelum/restfulie

a 1.0.1 é a mais nova do restfulie

Hum agora funcionou tudo ok com esse jar .

Ps : Esse jar anterior eu baixei daqui http://code.google.com/p/restfulie/ em que a ultima versão pra download é restfulie-java-client-1.0.0-beta-2.jar, seria o caso atualizar esse repositório também com a versão correta .

Hum estou sofrendo com outro problema agora relativo a charset , quando envio através de um post para o server um conjunto de dados que contém acentos “áâçôó” ele está truncando os caracteres ao receber .

Estou utilizando a seguinte chamada no meu cliente

RestClient restfulie = Restfulie.custom();
		restfulie.getMediaTypes().register(
				new XmlMediaType().withTypes(Boleto.class));
Boleto boleto = restfulie
				.at("http://localhost:8081/faturamento/boleto/create")
				.addHeaders(new HashMap<String, String>() {
					{
						put("Content-type", "application/xml");
					}
				}).accept("application/xml").post(boleto)
				.getResource();

Como faço pra forçar o charset /encoding pra utf-8 no envio ? nao achei nada na api relativo a isso e tentei forçar no content type também sem sucesso.

isso vai no content-type:

put("Content-type", "application/xml;charset=utf-8");  

[quote=Lucas Cavalcanti]isso vai no content-type:

put("Content-type", "application/xml;charset=utf-8"); [/quote]

Quando tento forçar isso ele me retorna uma exception :

br.com.caelum.restfulie.RestfulieException: Unsupported media type 'application/xml;charset=utf-8'
	at br.com.caelum.restfulie.mediatype.MediaTypes.forContentType(MediaTypes.java:27)
	at br.com.caelum.restfulie.http.apache.ApacheDispatcher.handlerFor(ApacheDispatcher.java:92)
	at br.com.caelum.restfulie.http.apache.ApacheDispatcher.process(ApacheDispatcher.java:73)
	at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:38)
	at br.com.caelum.restfulie.request.RequestChain.next(RequestChain.java:20)
	at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:29)
	at br.com.caelum.restfulie.http.DefaultHttpRequest.sendPayload(DefaultHttpRequest.java:43)
	at br.com.caelum.restfulie.http.DefaultHttpRequest.post(DefaultHttpRequest.java:98)
	at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:77)
	at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.main(FaturamentoRestServiceImpl.java:28)

estranho, achei que esse bug já tinha sido corrigido =X tenta substituir esse addHeaders por:

restfulie  
.at("http://localhost:8081/faturamento/boleto/create")
.as("application/xml")
.accept("application/xml")
.post(objeto)
   

daí vc pode tentar colocar o charset se não funcionar

utilizando esse código que voce postou :

restfulie
				.at("http://localhost:8081/faturamento/boleto/create")
				.as("application/xml")  
				.accept("application/xml").post(boleto)

funciona igual , mas continua truncando os acentos , e se tento força o charset com

restfulie
				.at("http://localhost:8081/faturamento/boleto/create")
				.as("application/xml;charset=utf-8")  
				.accept("application/xml").post(boleto)

mesma exception

Exception in thread "main" br.com.caelum.restfulie.RestfulieException: Unsupported media type 'application/xml;charset=utf-8'
	at br.com.caelum.restfulie.mediatype.MediaTypes.forContentType(MediaTypes.java:27)
	at br.com.caelum.restfulie.http.apache.ApacheDispatcher.handlerFor(ApacheDispatcher.java:92)
	at br.com.caelum.restfulie.http.apache.ApacheDispatcher.process(ApacheDispatcher.java:73)
	at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:38)
	at br.com.caelum.restfulie.request.RequestChain.next(RequestChain.java:20)
	at br.com.caelum.restfulie.request.RequestStack.process(RequestStack.java:29)
	at br.com.caelum.restfulie.http.DefaultHttpRequest.sendPayload(DefaultHttpRequest.java:43)
	at br.com.caelum.restfulie.http.DefaultHttpRequest.post(DefaultHttpRequest.java:98)
	at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.create(FaturamentoRestServiceImpl.java:73)
	at br.com.jslsolucoes.faturamento.service.impl.FaturamentoRestServiceImpl.main(FaturamentoRestServiceImpl.java:28)

pra confirmar estou utilizando restfulie-1.0.1.jar do link do maven que voce enviou

o servidor tb é restfulie?

pra corrigir vc pode fazer algo assim:

restfulie.getMediaTypes().register(  
    new XmlMediaType(){
        {withTypes(Boleto.class) }
        @Override
        public boolean answersTo(String type) {
              return super.answersTo(type.split(";")[0]);
        }
    }
); 

e por favor abre um bug pra isso:

Já abri a issue lá .

Meu lado servidor está assim


@Get
	@Path("dados/{boleto.id}")
	public void dados(Boleto boleto) {
		boleto = repositoryBoleto.load(boleto);
		if (boleto != null) {
			this.result.use(Results.representation()).from(boleto)
			.include("pessoaFisica").include("pessoaFisica.endereco")
			.include("pessoaFisica.endereco.cidade")
			.include("pessoaFisica.endereco.cidade.estado")
			.serialize();
		} else {
			this.result.use(Results.status()).notFound();
		}
	}

@Consumes
	@Post
	public void create(Boleto boleto) {
		this.repositoryBoleto.create(boleto);
		routes.uriFor(BoletoController.class).dados(boleto);
		this.result.use(Results.status()).created(routes.getUri());
	}

Utilizo o vraptor com a anotação consumes apenas .

Ps : Tentei com esse código que voce passou do lado cliente mas continua acusando “unsupported media type” , alguma outra ideia pra tentar resolver isso ?

tá passando pelo método answersTo que vc sobrescreveu?

tenta garantir isso, e ver se o split tá retornando corretamente.

RestClient restfulie = Restfulie.custom();
		restfulie.getMediaTypes().register(new XmlMediaType() {{
				withTypes(Boleto.class);
			}
			@Override
			public boolean answersTo(String type) {
				System.out.println("Type : " + type);
				System.out.println("answersTo : "+type.split(";")[0]);
				return super.answersTo(type.split(";")[0]);  
			}
		});
		
		restfulie
				.at("http://localhost:8081/faturamento/boleto/create")
				.as("application/xml;charset=utf-8")
				.accept("application/xml")
				.post(boleto);

Está passando sim pelo método answersTo

Imprime no console :

Type : application/xml;charset=utf-8
answersTo : application/xml

não entendi muito bem pois no seu código seu split vai continuar ignorando o charset ja que voce deu split e ta usando a primeira posição

o answersTo é só pra saber qual mediaType usar…

imprima o super.answersTo(type.split(";")[0]);, veja se está retornando true

baixei o fonte do github e agora entendi melhor qual era sua ideia , era so pra passar o teste do content-type desprezando o charset , estou brincando com o fonte aqui e mesmo fazendo o marshall correto do conteúdo sem truncar e os headers saindo corretos está chegando truncado do mesmo jeito :

Algumas impressões do conteúdo e headers que está saindo do httpclient

Classe br.com.caelum.restfulie.http.apache.ApacheDispatcher

StringWriter writer = new StringWriter();
		String type = headers.get("Content-type");
		try { 
                        //Correção para ignorar após ; se existir
			[b]if(type.contains(";")){
				type = type.split(";")[0];
			}[/b]
			
			handlerFor(type).marshal(payload, writer, client);
			writer.flush();
			
			HttpEntityEnclosingRequestBase verb = (HttpEntityEnclosingRequestBase) verbFor(method, uri);
			add(verb, headers);
			String string = writer.getBuffer().toString();
			[b]System.out.println("Content => "+string);[/b]
			verb.setEntity(new StringEntity(string));
			return execute(details, verb);
		} catch (IOException e) {
			throw new RestfulieException("Unable to marshal entity.", e);
		}

Imprime ok sem truncar :

Content => <?xml version="1.0" ?>102012-07-10 18:41:59.317 BRT2012-07-10 18:41:59.317 BRTPraça áãê

Ai no trecho de envio imprimo os headers para ver :

private ApacheResponse execute(Request details, HttpUriRequest method) {
		try {
			if (lastExecuted != null) {
				lastExecuted.discard();
			}			
			[b]for(Header header : method.getAllHeaders()){
				System.out.println(header.getName()+" => "+header.getValue());
			}[/b]
			HttpResponse response = http.execute(method, getContext());
			return responseFor(response, details);
		} catch (ClientProtocolException e) {
			throw new RestfulieException(
					"Unable to execute " + method.getURI(), e);
		} catch (IOException e) {
			throw new RestfulieException(
					"Unable to execute " + method.getURI(), e);
		}
	}

Imprimem :

Content-type => application/xml;charset=utf-8
Accept => application/xml

Agora complicou pois parece que o body esta correto e o charset esta saindo com o header correto também , não será algo no @Consumes do lado servidor ?? no Xstream tem algo relativo a isso pra serializar e deserializar utilizando algums charset específico ? Se tiver talvez seja ai o problema .

Liguei o debug do http client pra ver o que está saindo na hora da conexão http e da uma olhada lucas ve se ve algo que ajude :

19:02:11,864 DEBUG SingleClientConnManager:195 - Get connection for route HttpRoute[{}->http://localhost:8081]
19:02:11,887 DEBUG RequestAddCookies:131 - CookieSpec selected: best-match
19:02:11,897 DEBUG DefaultHttpClient:481 - Attempt 1 to execute request
19:02:11,897 DEBUG DefaultClientConnection:250 - Sending request: POST /faturamento/boleto/create HTTP/1.1
19:02:11,897 DEBUG wire:78 - >> "POST /faturamento/boleto/create HTTP/1.1[EOL]"
19:02:11,898 DEBUG wire:78 - >> "Content-type: application/xml;charset=utf-8[EOL]"
19:02:11,898 DEBUG wire:78 - >> "Accept: application/xml[EOL]"
19:02:11,898 DEBUG wire:78 - >> "Content-Length: 655[EOL]"
19:02:11,898 DEBUG wire:78 - >> "Host: localhost:8081[EOL]"
19:02:11,898 DEBUG wire:78 - >> "Connection: Keep-Alive[EOL]"
19:02:11,898 DEBUG wire:78 - >> "User-Agent: Apache-HttpClient/4.0.3 (java 1.5)[EOL]"
19:02:11,899 DEBUG wire:78 - >> "Expect: 100-continue[EOL]"
19:02:11,899 DEBUG wire:78 - >> "[EOL]"
19:02:11,899 DEBUG headers:254 - >> POST /faturamento/boleto/create HTTP/1.1
19:02:11,899 DEBUG headers:257 - >> Content-type: application/xml;charset=utf-8
19:02:11,899 DEBUG headers:257 - >> Accept: application/xml
19:02:11,900 DEBUG headers:257 - >> Content-Length: 655
19:02:11,900 DEBUG headers:257 - >> Host: localhost:8081
19:02:11,900 DEBUG headers:257 - >> Connection: Keep-Alive
19:02:11,900 DEBUG headers:257 - >> User-Agent: Apache-HttpClient/4.0.3 (java 1.5)
19:02:11,900 DEBUG headers:257 - >> Expect: 100-continue
19:02:11,901 DEBUG wire:78 - << "HTTP/1.1 100 Continue[EOL]"
19:02:11,903 DEBUG wire:78 - << "[EOL]"
19:02:11,903 DEBUG DefaultClientConnection:235 - Receiving response: HTTP/1.1 100 Continue
19:02:11,903 DEBUG headers:238 - << HTTP/1.1 100 Continue
19:02:11,904 DEBUG wire:78 - >> "<?xml version="1.0" ?><boleto><ativo>1</ativo><pago>0</pago><dataGeracao>2012-07-10 19:02:11.626 BRT</dataGeracao><dataVencimento>2012-07-10 19:02:11.626 BRT</dataVencimento><discriminacao>Pra[0xe7]a [0xe1][0xe3][0xea]</discriminacao><valor>90</valor><pessoaFisica><cpf></cpf><rg></rg><email></email><telefoneResidencial></telefoneResidencial><telefoneComercial></telefoneComercial><telefoneCelular></telefoneCelular><nomeCompleto>S[0xe1] Lemes</nomeCompleto><endereco><numero></numero><bairro></bairro><cep></cep><cidade><id>1</id><ativo>1</ativo></cidade><complemento></complemento><logradouro>[0xe3][0xe9][0xf5][0xf4]</logradouro><ativo>1</ativo></endereco><ativo>1</ativo></pessoaFisica></boleto>"
19:02:11,946 DEBUG wire:78 - << "HTTP/1.1 201 Created[EOL]"
19:02:11,947 DEBUG wire:78 - << "Server: Apache-Coyote/1.1[EOL]"
19:02:11,947 DEBUG wire:78 - << "Set-Cookie: JSESSIONID=1CFE0846803DBCD9628D43DCA62F5566; Path=/faturamento/; HttpOnly[EOL]"
19:02:11,947 DEBUG wire:78 - << "Location: http://localhost:8081/faturamento/boleto/dados/36[EOL]"
19:02:11,947 DEBUG wire:78 - << "Content-Length: 0[EOL]"
19:02:11,947 DEBUG wire:78 - << "Date: Tue, 10 Jul 2012 22:02:11 GMT[EOL]"
19:02:11,947 DEBUG wire:78 - << "[EOL]"
19:02:11,948 DEBUG DefaultClientConnection:235 - Receiving response: HTTP/1.1 201 Created
19:02:11,948 DEBUG headers:238 - << HTTP/1.1 201 Created
19:02:11,948 DEBUG headers:241 - << Server: Apache-Coyote/1.1
19:02:11,948 DEBUG headers:241 - << Set-Cookie: JSESSIONID=1CFE0846803DBCD9628D43DCA62F5566; Path=/faturamento/; HttpOnly
19:02:11,948 DEBUG headers:241 - << Location: http://localhost:8081/faturamento/boleto/dados/36
19:02:11,949 DEBUG headers:241 - << Content-Length: 0
19:02:11,949 DEBUG headers:241 - << Date: Tue, 10 Jul 2012 22:02:11 GMT
19:02:11,954 DEBUG ResponseProcessCookies:121 - Cookie accepted: "[version: 0][name: JSESSIONID][value: 1CFE0846803DBCD9628D43DCA62F5566][domain: localhost][path: /faturamento/][expiry: null]". 
19:02:11,955 DEBUG DefaultHttpClient:540 - Connection can be kept alive indefinitely
19:02:11,958 DEBUG SingleClientConnManager:250 - Releasing connection org.apache.http.impl.conn.SingleClientConnManager$ConnAdapter@1f6ba0f

vc colocou o parâmetro de encoding do vraptor pra utf-8 no web.xml?

<context-param>
    <param-name>br.com.caelum.vraptor.encoding</param-name>
    <param-value>UTF-8</param-value>
</context-param>