首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Marklogic -找不到Module /com.marklogic.hub/dhf.xqy

Marklogic -找不到Module /com.marklogic.hub/dhf.xqy
EN

Stack Overflow用户
提问于 2018-07-17 05:22:59
回答 0查看 198关注 0票数 0

MarkLogic版本: 9.0.6数据中心框架: 3.0.0

在MarkLogic服务器上成功初始化data-hub-framework之后,我正在尝试部署一个使用dhf.xqy的javascript模块。

代码语言:javascript
复制
const dhf = require('/com.marklogic.hub/dhf.xqy');

当我运行'gradle mlLoadModules‘命令时,构建成功,没有任何错误。但是当我运行'gradle mlDeploy‘命令时,得到错误’Module /com.marklogic.hub/dhf.xqy not found‘

代码语言:javascript
复制
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
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51370289

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档