저는 Roxy로 구성하고있는 Marklogic 9 프로젝트를 가지고 있습니다. 나는이 예제들을 따라왔다 : https://github.com/marklogic-community/roxy/wiki/Adding-Custom-Build-StepsMarklogic Roxy : app_specific.rb에서 자바 스크립트 모듈 호출
기본적으로 나는 컨텐츠 배포 후에 호출하고자하는 서버 측 JS 함수를 가지고있다. 나는 이런 식으로 뭔가를 :
# 당신은 당신의 새로운 방법
def deploy_content
# you can optionally call the original
original_deploy_content
# do your stuff here
execute_query(%Q{
xquery version "1.0-ml";
xdmp:javascript-eval('var process = require("/ingestion/process.sjs"); process.postDeployContent();')
},
:db_name => @properties["ml.app-name"] + "-content")
end
XQuery에 여기라는 쿼리 콘솔을 통해 실행될 때 좋은 평가되고 정의한다. app_specific.rb에서 XQuery를 통해 실행할 때 왜 모듈이
ERROR: 500 "Internal Server Error"
ERROR: <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>500 Internal Server Error</title>
<meta name="robots" content="noindex,nofollow"/>
<link rel="stylesheet" href="/error.css"/>
</head>
<body>
<span class="error">
<h1>500 Internal Server Error</h1>
<dl>
<dt>XDMP-MODNOTFOUND: var process = require("/ingestion/process.sjs"); process.postDeployContent(); -- Module /ingestion/process.sjs not found</dt>
<dd></dd>
<dt>in [anonymous], at 1:14 [javascript]</dt>
<dd></dd>
<dt>at 3:6,
in xdmp:eval("var process = require(&quot;/ingestion/process.sjs&quot;); proce...") [javascript]</dt>
<dd></dd>
<dt>in /eval, at 3:6 [1.0-ml]</dt>
<dd></dd>
</dl>
</span>
</body>
</html>
발견되지 않은 : 나는 ml의 지역 배포 내용을 호출 할 때, 나는 다음과 같은 오류가?
또는 여기에서 JS 모듈 함수를 호출하는 더 좋은 방법이 있습니다. 죄송합니다. xquery 측에 너무 익숙하지 않으므로 대신 JS 함수를 호출했습니다.
감사! 재 : github 티켓, 나는 github에 익숙하지 않아요, 어떻게 "이 티켓에 무게를 추가 할 수 있습니까?" 제가 할 수있는 일은 그것에 대한 의견입니다. –
로그인해야합니다. 그 후에는 댓글을 게시하거나 문제 나 댓글에 스마일리를 붙일 수 있습니다. 의견은 특히 당신이 당신의 필요성을 설명한다면 위대합니다. – grtjn