exist.db触发器准备期间出错

时间:2017-10-23 08:04:01

标签: triggers locking exist-db

如果我正在尝试修改甚至在exists-db(版本3.4.1)中的项目文件夹中创建文件,则会出现以下错误。

消息:

XMLDBException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection: 
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a 
function or variable declared in a library module is not in the target namespace of the 
library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]

异常Stacktrace:

org.xmldb.api.base.XMLDBException: Failed to invoke method parse in class 
org.exist.xmlrpc.RpcConnection: 
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:528)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:502)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:471)
at org.exist.client.DocumentView$2.run(DocumentView.java:361)
Caused by: org.apache.xmlrpc.XmlRpcException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection: 
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:524)
... 3 more
Caused by: org.apache.xmlrpc.XmlRpcException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection: 
org.exist.collections.triggers.TriggerException: Error during trigger prepare
org.exist.xquery.XPathException: err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]
at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:143)
at org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
at org.exist.xmldb.RemoteCollection.store(RemoteCollection.java:524)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:502)
at org.exist.xmldb.RemoteCollection.storeResource(RemoteCollection.java:471)
at org.exist.client.DocumentView$2.run(DocumentView.java:361)

也许是锁定问题?在同一项目的另一个文件夹中,可以编辑所有资源。并且出现错误的文件最初是由我创建的...所以它之前已经有效了。

重新安装后,它会工作一段时间,然后突然再次出现错误。

权限设置正确!

1 个答案:

答案 0 :(得分:2)

您的问题的解释是在错误消息的这一部分:

err:XQST0048 It is a static error if a function or variable declared in a library module is not in the target namespace of the library module. [source: /db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql]

集合中的触发器包含错误,因此当它触发并且您尝试存储文档时,触发器导致的错误会阻止文档存储。

您需要编辑/db/apps/ediarum/routinen/trigger/set-permissions-for-document.xql并修复XQuery中的错误。