Return-Path: X-Original-To: apmail-manifoldcf-commits-archive@www.apache.org Delivered-To: apmail-manifoldcf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F25411B92 for ; Mon, 11 Aug 2014 16:05:10 +0000 (UTC) Received: (qmail 21709 invoked by uid 500); 11 Aug 2014 16:05:10 -0000 Delivered-To: apmail-manifoldcf-commits-archive@manifoldcf.apache.org Received: (qmail 21670 invoked by uid 500); 11 Aug 2014 16:05:10 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 21661 invoked by uid 99); 11 Aug 2014 16:05:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2014 16:05:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Aug 2014 16:05:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id DBDDA23889CB; Mon, 11 Aug 2014 16:04:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1617313 - in /manifoldcf/branches/release-1.7-branch: ./ connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/ framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/ Date: Mon, 11 Aug 2014 16:04:48 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140811160448.DBDDA23889CB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Mon Aug 11 16:04:48 2014 New Revision: 1617313 URL: http://svn.apache.org/r1617313 Log: Pull up fix for CONNECTORS-1007 from trunk. Modified: manifoldcf/branches/release-1.7-branch/ (props changed) manifoldcf/branches/release-1.7-branch/CHANGES.txt manifoldcf/branches/release-1.7-branch/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java Propchange: manifoldcf/branches/release-1.7-branch/ ------------------------------------------------------------------------------ Merged /manifoldcf/trunk:r1617312 Modified: manifoldcf/branches/release-1.7-branch/CHANGES.txt URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.7-branch/CHANGES.txt?rev=1617313&r1=1617312&r2=1617313&view=diff ============================================================================== --- manifoldcf/branches/release-1.7-branch/CHANGES.txt (original) +++ manifoldcf/branches/release-1.7-branch/CHANGES.txt Mon Aug 11 16:04:48 2014 @@ -3,6 +3,9 @@ $Id$ ======================= Release 1.7 ===================== +CONNECTORS-1007: Fix CMIS connector so that tests pass. +(Karl Wright) + CONNECTORS-1006: Update googledrive API to latest released version. (Karl Wright) Modified: manifoldcf/branches/release-1.7-branch/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.7-branch/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java?rev=1617313&r1=1617312&r2=1617313&view=diff ============================================================================== --- manifoldcf/branches/release-1.7-branch/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java (original) +++ manifoldcf/branches/release-1.7-branch/connectors/cmis/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/cmis/CmisRepositoryConnector.java Mon Aug 11 16:04:48 2014 @@ -1064,7 +1064,7 @@ public class CmisRepositoryConnector ext getSession(); Logging.connectors.debug("CMIS: Inside processDocuments"); - + String cmisQuery = StringUtils.EMPTY; for (int i = 0; i < spec.getChildCount(); i++) { @@ -1112,7 +1112,13 @@ public class CmisRepositoryConnector ext // content ingestion Document document = (Document) cmisObject; - document = document.getObjectOfLatestVersion(false); + try { + document = document.getObjectOfLatestVersion(false); + } catch (CmisObjectNotFoundException e) { + // Document gone + activities.deleteDocument(nodeId); + continue; + } long fileLength = document.getContentStreamLength(); InputStream is = null; @@ -1323,7 +1329,12 @@ public class CmisRepositoryConnector ext //we have to check if this CMIS repository support versioning // or if the versioning is disabled for this content - document = document.getObjectOfLatestVersion(false); + try { + document = document.getObjectOfLatestVersion(false); + } catch (CmisObjectNotFoundException e) { + rval[i] = null; + continue; + } if(StringUtils.isNotEmpty(document.getVersionLabel())){ rval[i] = document.getVersionLabel() + ":" + cmisQuery; } else { Modified: manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java URL: http://svn.apache.org/viewvc/manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java?rev=1617313&r1=1617312&r2=1617313&view=diff ============================================================================== --- manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java (original) +++ manifoldcf/branches/release-1.7-branch/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connectors/BaseRepositoryConnector.java Mon Aug 11 16:04:48 2014 @@ -645,7 +645,8 @@ public abstract class BaseRepositoryConn else versionStrings[i] = vc.getVersionString(); } - processDocuments(documentIdentifiers,versionStrings,activities,spec,scanOnly,jobMode); + if (spec != null) + processDocuments(documentIdentifiers,versionStrings,activities,spec,scanOnly,jobMode); } /** Process a set of documents.