Results 1 to 2 of 2

Thread: Error while accessing the CXF RESTful services uri

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Default Error while accessing the CXF RESTful services uri

    When I try to access the RSTFul services uri, I get the following exception:

    Cannot access WADL: Please restart your REST application, and refresh this page.

    If you still see this error and if you are accessing this page using Firefox with Firebug plugin, then
    you need to disable firebug for local files. That is from Firefox menubar, check
    Tools > Firebug > Disable Firebug for Local Files



    When I try to access the URL for my app, or the WADL, I get the HTTP 404 page not found exception.


    Folliwng is my web.xml, where I have configured the spring security....


    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>


    <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>org.springframework.web.filter.DelegatingFil terProxy</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>CXFServlet</servlet-name>
    <servlet-class>
    org.apache.cxf.transport.servlet.CXFServlet
    </servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
    <servlet-name>CXFServlet</servlet-name>
    <url-pattern>/*</url-pattern>
    </servlet-mapping>





    Following is part of my RESTful service interface:

    @GET
    @Path("/login.jsp")
    public void login(HttpServletRequest req, HttpServletResponse res)
    {
    _log.debug("in login method...");

    String username = req.getParameter("j_username");
    String password = req.getParameter("j_password");

    _log.debug("username = " + username);
    _log.debug("password = " + password);


    }



    I have deployed this in the Tomcat server.

    If I access http://localhost:8080/myServer/login.jsp, I get the 404 error.

    And in the tomcat server I see the following stack trace when I access the above URL:


    09/12/11 16:40:08 [ WARN] ("http-bio-8080"-exec-4) jaxrs.utils.JAXRSUtils (findT
    argetMethod:401) - No operation matching request path /login.do is found, HTTP M
    ethod : GET, ContentType : */*, Accept : image/gif,image/jpeg,image/pjpeg,image/
    pjpeg,application/x-shockwave-flash,application/vnd.ms-excel,application/vnd.ms-
    powerpoint,application/msword,application/xaml+xml,application/vnd.ms-xpsdocumen
    t,application/x-ms-xbap,application/x-ms-application,*/*,.
    09/12/11 16:40:08 [ WARN] ("http-bio-8080"-exec-4) jaxrs.impl.WebApplicationExce
    ptionMapper (toResponse:54) - WebApplicationException has been caught : no cause
    is available









  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    Please explain how this relates to Spring Security. For example... Does it work if you remove the Spring Security Filter? Does it work if you remove the Spring Security Configuration (if so what part and please provide the configuration)? If you are using global-method-security have you specified global-method-security@proxy-target-class="true"?

    PS: Please use the code tags (i.e. the # button).
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •