Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-41046

org.apache.cxf.interceptor.Fault: Cannot write part return. RPC/Literal parts cannot be null. (WS-I BP R2211)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 12.5, 19.0, 20.0
    • Fix Version/s: None
    • Component/s: Web Services
    • Labels:
      None
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      When calling a SakaiScript webservice such as getSiteProperty

          /**
           * Get a custom property of a site
           *
           * @param sessionid the id of a valid session
           * @param siteid    the id of the site you want to get the property from
           * @param propname  the name of the property you want
           * @return the property or blank if not found/property is blank
           * @throws RuntimeException
           */
          @WebMethod
          @Path("/getSiteProperty")
          @Produces("text/plain")
          @GET
          public String getSiteProperty(
                  @WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid,
                  @WebParam(name = "siteid", partName = "siteid") @QueryParam("siteid") String siteid,
                  @WebParam(name = "propname", partName = "propname") @QueryParam("propname") String propname) {
             .
             .
             .

      where the propname does NOT exist for the given site, an exception occurs

      06-Dec-2018 11:40:32.517 WARN [http-nio-8980-exec-9] org.apache.cxf.phase.PhaseInterceptorChain.doLog Interceptor for {http://webservices.sakaiproject.org/}SakaiScriptService#{http://webservices.sakaiproject.org/}getSiteProperty has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Cannot write part return. RPC/Literal parts cannot be null. (WS-I BP R2211)
      	at org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor.handleMessage(RPCOutInterceptor.java:103)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
      	at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
      	at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:267)
      	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
      	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
      	at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:189)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:303)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:222)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
      	at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:278)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:467)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
      	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
      	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
      	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      However, at least in my case, this error is benign and does cause any issues with what we're trying to get out of this webservice call

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  steve.swinsburg Steve Swinsburg
                  Reporter:
                  austinUH Austin
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                    Dates

                    Created:
                    Updated:

                      Git Integration