簡體   English   中英

eXist-db:使用 XML:DB API 從 Java 應用程序連接時的用戶名/密碼

[英]eXist-db: username/password when connecting from Java applications with the XML:DB API

我想將數據從我的 Java 應用程序插入到安全的 eXist-db

我找到了這個文檔: https : //exist-db.org/exist/apps/doc/devguide_xmldb但它沒有傳遞用戶名和密碼的指南。

我試過

database.setProperty("username", "admin");
database.setProperty("password", "admin");

但是仍然拋出這個異常:

org.xmldb.api.base.XMLDBException: Failed to invoke method parse in class org.exist.xmlrpc.RpcConnection: Write permission is not granted on the Collection

有人可以幫忙嗎?

您可以在 eXist 書中找到使用 eXist-db 的 XML:DB API 的示例,參考示例 Java 應用程序代碼在這里: https : //github.com/eXist-book/book-code/tree/master/chapters/集成/xmldb-客戶端

具體來說,您可能會發現這很有幫助:

https://github.com/eXist-book/book-code/blob/master/chapters/integration/xmldb-client/xmldb-client-store/src/main/java/exist/book/example/xmldb/client/ StoreApp.java#L56

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM