Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5889

No root resource matching request when using atmosphere websocket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0
    • 3.0.2
    • Transports
    • atmosphere-runtime 2.1.7
      Apache Tomcat/7.0.52

    Description

      When using websocket jax-rs in container mode with atmoshpere,
      org.apache.cxf.transport.endpoint.address is not set in the request used to resolve jaxrs resource, which means it will not trucate the
      container path in the uri before comparing with @Path, and since WebSocketVirtualServletRequest will check if the request is within the orgin path, work aound by request uri is not possible.

      the request in the org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketHandler passed into org.apache.cxf.transport.websocket.atmosphere.AtmosphereWebSocketHandler.onMessage()
      did contains the attribute, but it is not copied to the request created in createServletRequest

      [INFO ] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.interceptor.LoggingInInterceptor| Inbound Message
      ----------------------------
      ID: 8
      Address: http://127.0.0.1:8080/jaxrs-websocket/websocket/web/bookstore/bookbought
      Http-Method: GET
      Content-Type:
      Headers: {$method=[GET], $uri=[/jaxrs-websocket/websocket/web/bookstore/bookbought], Content-Type=[null]}
      --------------------------------------
      [DEBUG] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.phase.PhaseInterceptorChain| Invoking handleMessage on interceptor org.apache.cxf.transport.https.CertConstraintsInterceptor@5e834b36
      [DEBUG] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.phase.PhaseInterceptorChain| Invoking handleMessage on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor@7a0522a5
      [INFO ] 09:50:44.315|http-bio-8080-exec-3|org.apache.cxf.transport.websocket.WebSocketVirtualServletRequest| getAttribute(org.apache.cxf.transport.endpoint.address)
      [DEBUG] 10:03:01.926|http-bio-8080-exec-3|org.apache.cxf.jaxrs.utils.JAXRSUtils| Trying to select a resource class, request path : /jaxrs-websocket/websocket/web/bookstore/bookbought
      [WARN ] 10:03:01.927|http-bio-8080-exec-3|org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor| No root resource matching request path /jaxrs-websocket/websocket/web/bookstore/bookbought has been found, Relative Path: /jaxrs-websocket/websocket/web/bookstore/bookbought. Please enable FINE/TRACE log level for more details.
      [WARN ] 10:03:01.927|http-bio-8080-exec-3|org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper| javax.ws.rs.NotFoundException: HTTP 404 Not Found

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            void_method Joseph Leung
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: