XDMP-MODNOTFOUND :(错误:XQST0059)未找到模块/c/code/lib-multipart-post.xqy

时间:2015-07-02 08:15:15

标签: module xquery pipeline marklogic

我是MarkLogic的新用户。我开发了运行以下模块的管道:

xquery version "1.0-ml";

import module namespace cpf="http://marklogic.com/cpf" at "/MarkLogic/cpf/cpf.xqy";
import module namespace local="http://marklogic.com/ps/lib-multipart-post" at "/c/code/lib-multipart-post.xqy";
import module namespace util = "http://marklogic.com/xdmp/utilities" at "/MarkLogic/utilities.xqy";

declare variable $cpf:document-uri as xs:string external;
declare variable $cpf:transition as node() external;

if (cpf:check-transition($cpf:document-uri,$cpf:transition)) then 
  try {
    let $basename := util:basename( $cpf:document-uri )
    let $rosokaResultpath :=util:basepath( $cpf:document-uri ) 
    let $docname := substring-before($basename, '.')
    let $newpath := fn:concat($rosokaResultpath ,'/',$docname,'_rosoka.xml')
    let $RosokaConn := local:multipart-post(
      "http://localhost:8080/RosokaWeb/rosoka", 
      "------------12345xyz", 
      (<data name="file" filename="{$basename}" type="application/xml">      {$cpf:document-uri}</data>,
       <data name="responseType">application/xml</data>))
    return

      xdmp:document-insert(
        $newpath, $RosokaConn[2],
        xdmp:default-permissions(),
        "Rosoka_result"),

    xdmp:log( "Rosoka statistics saved" ),
    cpf:success($cpf:document-uri, $cpf:transition, ())
  } catch ($e) {
    cpf:failure($cpf:document-uri, $cpf:transition, $e, ())
  }
else ()

但是,当此管道运行时,我收到此错误消息:

<error:code>XDMP-MODNOTFOUND</error:code>
<error:name>err:XQST0059</error:name>
<error:xquery-version>1.0-ml</error:xquery-version>
<error:message>Module not found</error:message>
<error:format-string>XDMP-MODNOTFOUND: (err:XQST0059) Module /c/code /lib-multipart-post.xqy not found</error:format-string>
<error:retryable>false</error:retryable>

即使我将lib-multipart-post.xqy放在模块数据库中并使用适当的URI。

请帮助

1 个答案:

答案 0 :(得分:0)

/ c / code之后的空格是可疑的。你的路上真的有空间吗?