-
1. Re: An Exception trhows when uses Resteasy with Seam
gugabcosta Jun 4, 2009 8:42 PM (in response to gugabcosta)Hi,
I forgot one thing in the code,
@Path("/{documentoId}") @Produces(MediaType.APPLICATION_XML) public DocumentoRest getDocumento(@PathParam("documentoId") String id) { Documento find = service.find(Documento.class, new Long(id)); DocumentoRest rest = new DocumentoRest(); rest.setId(find.getId()); rest.setDescricao(find.getDescricao()); return rest; }
Any idea?
-
2. Re: An Exception trhows when uses Resteasy with Seam
gugabcosta Jun 4, 2009 8:45 PM (in response to gugabcosta)Well... Again...
@GET @Path("/{documentoId}") @Produces(MediaType.APPLICATION_XML) public DocumentoRest getDocumento(@PathParam("documentoId") String id) { Documento find = service.find(Documento.class, new Long(id)); DocumentoRest rest = new DocumentoRest(); rest.setId(find.getId()); rest.setDescricao(find.getDescricao()); return rest; }
Now it's my code....
Any idea? -
3. Re: An Exception trhows when uses Resteasy with Seam
gugabcosta Jun 4, 2009 8:59 PM (in response to gugabcosta)Hi...
The full stacktrace is
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.String.substring(String.java:1768)
org.jboss.seam.exception.RedirectHandler.handle(RedirectHandler.java:39)
org.jboss.seam.exception.Exceptions.handle(Exceptions.java:76)
org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:114)
org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)thanks...
-
4. Re: An Exception trhows when uses Resteasy with Seam
christian.bauer Jun 4, 2009 10:09 PM (in response to gugabcosta)What version of Seam and RESTEasy is this? There have been major changes to the RESTEasy integration code in the last 10 months with almost every release of Seam. Also, what you are trying to do works fine in the tests. Finally, what you posted is certainly not the complete stacktrace, you left the real cause. (Which I suspect to be in RESTEasy code.)
-
5. Re: An Exception trhows when uses Resteasy with Seam
christian.bauer Jun 4, 2009 10:20 PM (in response to gugabcosta)Sorry, missed the RedirectHandler there in the stacktrace. So it looks like this is a Seam issue, see https://jira.jboss.org/jira/browse/JBSEAM-4209
-
6. Re: An Exception trhows when uses Resteasy with Seam
gugabcosta Jun 4, 2009 10:48 PM (in response to gugabcosta)Hi Christian,
The version of Seam is 2.1.2.CR2 and the version of RESTEasy is 1.1-RC2.
I have already seen the https://jira.jboss.org/jira/browse/JBSEAM-4209.
I'm using the integration of seam and RESTEasy, the jboss-seam-resteasy.
thanks