Hi,
My colleagues are trying to add versions using CWS 10.5 but next error is found:
2014-07-23 13:53:40,302 WARN [http-bio-172.22.166.176-12228-exec-7] Status: 903101
2014-07-23 13:53:40,309 WARN [http-bio-172.22.166.176-12228-exec-7] Error Code: DocMan.ErrorCreatingVersion
2014-07-23 13:53:40,309 WARN [http-bio-172.22.166.176-12228-exec-7] Error Message: Dispatched DocumentManagement service threw exception DocMan.ErrorCreatingVersion : Error adding version to 'bs.properties'. Error reading data stream from version. [E682033159]
2014-07-23 13:53:40,310 WARN [http-bio-172.22.166.176-12228-exec-7] ApiError: Error reading data stream from version.
No problem exists for adding neu documents.
The piece of used code is:
String contextID = null;
ContentService contentService = null;
DataDocument dataDoc = null;
FileAtts fileAtts = null;
try {
log.debug("uploadContent:Node IsVersionable {}", node.isIsVersionable());
log.debug("uploadContent:Old Version Document {}", node.getVersionInfo().getVersionNum());
log.debug("uploadContent:Versioning Context...");
contextID = docManagement.addVersionContext(node.getID(), null);
// contextID = docManagement.addVersionContext(node.getID(), node.getMetadata());
log.debug("uploadContent:New Version ContextID {}", contextID);
dataDoc = new DataDocument(entityData.getDocument());
int fileSize = dataDoc.getSize();
log.debug("uploadContent:Document size = {}", fileSize);
fileAtts = fileUtils.setFileAttributes(docTitle, fileSize);
contentService = cws.getContentService(contextID, otAuth, fileAtts);
log.debug("uploadContent:Uploading Content...");
contextID = contentService.uploadContent(documentHandler);
log.debug("uploadContent:New contextID {}", contextID);
} catch (Exception e) {
log.error("uploadContent:Error {}", e.getMessage());
}
Any idea?