0 Replies Latest reply on Jan 14, 2013 9:47 AM by lsri8088

    Rest Service and json java.net.URISyntaxException: Illegal character

    lsri8088 Newbie

      Hello,

       

       

      When I run a REST service through a JSON string parameter gives me the error that indicated the end.

       

       

      I tried it on 3 different servers (development, pre-production and production) and personal computers, and I only server failure development.

       

       

      Can you set something missing in Jboss?

       

       

      JBOSS 4.3.0.GA_CP03

      Seam 2

      Java 1.5.0_22-b03

      Server OS: Linux

       

      Thanks

       

      2013-01-14 11:59:10,621 ERROR [STDERR] 154650 [ajp-192.168.207.24-8009-1] WARN org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher - Failed to parse request.

      2013-01-14 11:59:10,621 ERROR [STDERR] java.lang.RuntimeException: Failed to create URI: http://xxx.xxxxx.com/myContext/restful-services/test/2012/1.0/validate/{<JSON STRING>}

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.specimpl.UriBuilderImpl.buildFromMap(UriBuilderImpl.java:408)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.specimpl.UriBuilderImpl.buildFromValues(UriBuilderImpl.java:558)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.specimpl.UriBuilderImpl.build(UriBuilderImpl.java:539)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractUriInfo(ServletUtil.java:54)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:180)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:48)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:43)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:381)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:65)

      2013-01-14 11:59:10,622 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:393)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)

      2013-01-14 11:59:10,623 ERROR [STDERR]           at java.lang.Thread.run(Thread.java:595)

      2013-01-14 11:59:10,623 ERROR [STDERR] Caused by: java.lang.IllegalArgumentException

      2013-01-14 11:59:10,623 ERROR [STDERR]           at java.net.URI.create(URI.java:842)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at org.jboss.resteasy.specimpl.UriBuilderImpl.buildFromMap(UriBuilderImpl.java:404)

      2013-01-14 11:59:10,624 ERROR [STDERR]           ... 56 more

      2013-01-14 11:59:10,624 ERROR [STDERR] Caused by: java.net.URISyntaxException: Illegal character in path at index 74: http://xxx.xxxxxxx.com/myContext/restful-services/test/2012/1.0/validate/{<JSON STRING>}

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI$Parser.fail(URI.java:2816)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI$Parser.checkChars(URI.java:2989)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI$Parser.parseHierarchical(URI.java:3073)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI$Parser.parse(URI.java:3021)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI.<init>(URI.java:578)

      2013-01-14 11:59:10,624 ERROR [STDERR]           at java.net.URI.create(URI.java:840)

      2013-01-14 11:59:10,624 ERROR [STDERR]           ... 57 more

      2013-01-14 11:59:10,676 ERROR [org.apache.catalina.core.ContainerBase] Servlet.service() para servlet Resteasy lanz? excepci?n

      java.lang.IllegalStateException: No puedo crear una sesi?n despu?s de llevar a cabo la respueta

                at org.apache.catalina.connector.Request.doGetSession(Request.java:2284)

                at org.apache.catalina.connector.Request.getSession(Request.java:2066)

                at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:833)

                at org.jboss.seam.mock.MockExternalContext.getSessionMap(MockExternalContext.java:349)

                at org.jboss.seam.contexts.FacesLifecycle.beginExceptionRecovery(FacesLifecycle.java:69)

                at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:100)

                at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:71)

                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)

                at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)

                at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)

                at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)

                at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)

                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)

                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

                at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)

                at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

                at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

                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:230)

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)

                at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)

                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

                at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)

                at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)

                at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)

                at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:393)

                at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)

                at java.lang.Thread.run(Thread.java:595)