我使用domino appdev pack 1.0.7 Java API从数据库中读取文档。目前只尝试Domino AppDev包中的示例代码。代码如下:
Server server = new Server('testappdev.com.tw', 5000,
new File("ca.crt"),
new File("user.crt"),
new File("user.key"),
"",
"",
Executors.newSingleThreadExecutor());
Database client = server.useDatabase("test.nsf");
String query = "'Contact' and FirstName = 'fname'";
List<Document> responseDocs = client.readDocuments(query).get();
当查询有结果文档时,它工作得很好,但当查询没有结果文档时,它得到了下面的异常。
java.util.concurrent.ExecutionException: com.hcl.domino.db.model.BulkOperationException: Internal error
at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:552)
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:533)
at com.google.common.util.concurrent.FluentFuture$TrustedFuture.get(FluentFuture.java:84)
at com.xred.DqlDemo.ReadIssue.main(ReadIssue.java:39)
Caused by: com.hcl.domino.db.model.BulkOperationException: Internal error
at com.hcl.domino.db.model.Database.noteToDocuments(Database.java:1881)
at com.hcl.domino.db.model.Database.access$000(Database.java:38)
at com.hcl.domino.db.model.Database$1.apply(Database.java:2006)
at com.hcl.domino.db.model.Database$1.apply(Database.java:2003)
at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:214)
at com.google.common.util.concurrent.AbstractTransformFuture$AsyncTransformFuture.doTransform(AbstractTransformFuture.java:203)
at com.google.common.util.concurrent.AbstractTransformFuture.run(AbstractTransformFuture.java:118)
at com.google.common.util.concurrent.MoreExecutors$5$1.run(MoreExecutors.java:991)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
当查询没有结果单据时,如何防止此错误?
谢谢!
发布于 2021-04-01 13:38:41
这个问题应该在昨天发布的appdev pack 1.0.8中得到解决。
https://stackoverflow.com/questions/66897692
复制相似问题