我想通過Android從OpenCMIS查詢Alfresco存儲庫。 但得到低於錯誤但不是每次。 這是我的代碼。當我作爲一個獨立的程序運行,但不能很好地與Android工作時,此代碼工作正常。java.net.SocketException:發送失敗:EPIPE(破損的管道)
getCMISClientSession();
ItemIterable<QueryResult> results = session.query("SELECT * FROM cmis:document
where cmis:name ='"+docName+"'", false);
for (QueryResult result : results) { //Exception thrown from here
String docId = result.getPropertyValueById(PropertyIds.OBJECT_ID);
doc = (Document)session.getObject(docId);
}
Stackstrace
org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Cannot access http://<192.168.1.122>:8080/alfresco/cmisatom/eee7da3c-d3d4-48de-89a1-52145a6a6e06/query: sendto failed: EPIPE (Broken pipe)
at org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils.invoke(HttpUtils.java:224)
at org.apache.chemistry.opencmis.client.bindings.spi.http.HttpUtils.invokePOST(HttpUtils.java:74)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.post(AbstractAtomPubService.java:561)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.DiscoveryServiceImpl.query(DiscoveryServiceImpl.java:137)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl$3.fetchPage(SessionImpl.java:567)
at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
這是因爲Android模擬器是慢?請諮詢我如何解決這個錯誤。
您使用OpenCMIS的哪些版本(librairies)? Android客戶端? – 2013-02-11 15:52:44
@ JM.Pascal,是的,Android客戶端 – Sam 2013-02-12 01:20:51