MarkLogic 版本:9.0.6 数据中心框架工作:3.0.0
在 MarkLogic 服务器上成功初始化数据集线器框架后,我正在尝试部署一个使用 dhf.xqy 的 javascript 模块。
const dhf = require('/com.marklogic.hub/dhf.xqy');
当我运行“gradle mlLoadModules”命令时,构建成功,没有任何错误。但是当我运行“gradle mlDeploy”命令时,出现错误“找不到模块/com.marklogic.hub/dhf.xqy”
PS G:\data-hub> gradle mldeploy
> Task :hubPreInstallCheck
com.marklogic.hub.impl.DataHubImpl@113a53ae
Error caught while loading modules, cause: Local message: config/resources
write failed: Bad Request. Server Message: RE
STAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: invalid customer-
pref extension: could not parse JavaScript extens
ion customer-pref; please see the server error log for detail XDMP-
MODNOTFOUND: (function (exports, module, require) { c
onst dhf = require('/com.marklogic.hub/dhf.xqy'); -- Module
/com.marklogic.hub/dhf.xqy not found; customer-pref either i
s not a valid JavaScript module or does not export functions (delete, get,
put, post)
com.marklogic.client.FailedRequestException: Local message:
config/resources write failed: Bad Request. Server Message:
RESTAPI-INVALIDCONTENT: (err:FOER0000) Invalid content: invalid customer-
pref extension: could not parse JavaScript exte
nsion customer-pref; please see the server error log for detail XDMP-
MODNOTFOUND: (function (exports, module, require) {
const dhf = require('/com.marklogic.hub/dhf.xqy'); -- Module
/com.marklogic.hub/dhf.xqy not found; customer-pref either
is not a valid JavaScript module or does not export functions (delete,
get, put, post)
at
com.marklogic.client.impl.OkHttpServices.putPostValueImpl
(OkHttpServices.java:2872)
at
com.marklogic.client.impl.OkHttpServices.putValue
(OkHttpServices.java:2739)
at
com.marklogic.client.impl.ResourceExtensionsImpl.writeServices
(ResourceExtensionsImpl.java:206)
at
com.marklogic.client.ext.modulesloader.impl.DefaultModulesLoader.
lambda$installService$1(DefaultModulesLoader
.java:452)
at
com.marklogic.client.ext.modulesloader.impl.DefaultModulesLoader.
lambda$executeTask$5(DefaultModulesLoader.java:545)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
BUILD SUCCESSFUL in 52s
4 actionable tasks: 4 executed