cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-3422) 'Cannot find target method' when certain hex-encoded characters are used in @PathParam in GET requests
Date Mon, 28 Mar 2011 11:48:05 GMT

     [ https://issues.apache.org/jira/browse/CXF-3422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-3422.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.4
                   2.4
         Assignee: Sergey Beryozkin

Resolved in the snapshots

> 'Cannot find target method' when certain hex-encoded characters are used in @PathParam
in GET requests
> ------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-3422
>                 URL: https://issues.apache.org/jira/browse/CXF-3422
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.3.1, 2.3.3
>         Environment: Tomcat 6
>            Reporter: Karel Vlcek
>            Assignee: Sergey Beryozkin
>            Priority: Minor
>             Fix For: 2.4, 2.3.4
>
>
> I have following simple JAX-RS service:
> {code}
> public interface RootService {
>     @Path("data1")
>     public DataService getDataService();
> }
> public interface DataService {
>     @GET
>     @Path("data2/{id}")
>     public Data getData(@PathParam("id") String id);
> }
> {code}
> All works correctly as long as URL contains in position of @PathParam("id") ASCII characters
and digits or hex-encoded spaces. These URLs work:
> GET /root/data1/data2/1
> GET /root/data1/data2/AAA2BBB
> GET /root/data1/data2/1%202
> However, when URL on position of the parameter {id} contains certain hex-encoded characters
other than space (%20), like in this URL (this example contains digit '1' followed by 'latin
capital letter d with caron'):
> GET /root/data1/data2/1%C4%8E
> I'll get following exception:
> {noformat}
> javax.ws.rs.WebApplicationException
> 	at org.apache.cxf.jaxrs.utils.JAXRSUtils.findTargetMethod(JAXRSUtils.java:399)
> 	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:204)
> 	at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:88)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113)
> 	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97)
> 	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461)
> 	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:149)
> 	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:148)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:108)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
> 	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> 	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:298)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> 	at java.lang.Thread.run(Thread.java:662)
> {noformat}
> {code}
> //////////////////////////////
> // Simple implementations - just to complete the example...
> public class RootServiceImpl implements RootService {
>     @Override
>     public DataService getDataService() {
>         return new DataServiceImpl();
>     }
> }
> public class DataServiceImpl implements DataService {
>     @Override
>     public Data getData(final String id) {
>       // ...
>     }
> }
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message