我是MLDataHubFramework的新手,开始按照marklogic文档创建新的实体流。
1.创建客户实体并提取到登台数据库。
2.在尝试执行协调时,出现以下问题。
错误输出:
java.lang.RuntimeException: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at resources/ml:sjsFlow: Internal Server Error. Server Message: TDE-INDEX: xdmp:eval("xdmp.docume
ntInsert(\"/12545362905389506919.json\",trace,xdmp.de...", {trace:{trace:{jobId:"38b8a84d-7927-4aac-a482-33d64a9cf56e", format:"json", traceId:"12545362905389506919", ...}}}, {database:"3883525708217113046", co
mmit:"auto", update:"true", ...}) -- Error applying template /tde/Customer-0.0.1.tdex to document /12545362905389506919.json: TDE-EVALFAILED: Eval for $subject-iri='sem:iri(concat("http://example.com/Customer-0
.0.1/Customer/", fn:encode-for-uri(./CustomerId)))' returns TDE-BADVALEXPRESSION: Invalid val expression: XDMP-ARGTYPE: (err:XPTY0004) arg1 is not of type xs:string? . See the MarkLogic server error log for fur
ther detail.
但是在这里我已经将CustomerId定义为string。 谁能建议我出什么问题了?我也交叉验证了TDE文件和其他内容(模式,实体json,xsd),但是在ll的那些文件中没有发现任何问题。
答案 0 :(得分:0)
MarkLogic说,当将此TDE模板应用于新文档时,它得到的值不合适。
将模板/tde/Customer-0.0.1.tdex应用于文档/12545362905389506919.json时出错:TDE-EVALFAILED:$ subject-iri ='sem:iri(concat(“ http://example.com/Customer-0的评估 .0.1 / Customer /“,fn:encode-for-uri(./ CustomerId)))返回TDE-BADVALEXPRESSION:无效的val表达式:XDMP-ARGTYPE:(err:XPTY0004)arg1不是xs:string类型吗? / p>
尝试一下:
global
并查看得到的内容类似的东西:
from turtle import Screen, Turtle
def changeTurtle():
index = shapes.index(turtle.shape()) + 1
shape = shapes[index % len(shapes)]
turtle.shape(shape)
screen.title(shape)
turtle = Turtle()
turtle.shapesize(3)
turtle.shape('classic') # first turtle 'classic' shape
screen = Screen()
screen.title(turtle.shape())
shapes = screen.getshapes()
screen.onkey(changeTurtle, 'n') # press 'n' key
screen.listen()
screen.mainloop()
我想知道您是否会返回多个CustomerId,这将适合错误消息。
如果这样做不行,建议您使用最小版本的文档和重新创建错误所需的模板来更新问题。有了这些信息,发现问题应该容易得多。