AnsweredAssumed Answered

Not able to add aspect in CMIS

Question asked by vikasbhardwaj on Oct 8, 2018
Latest reply on Oct 10, 2018 by jpotts

HI all,

I am going to update aspect but it is giving internal server error for this?

here is code that is going to update the aspect 

 

 

private static void customAspectAdd(AlfrescoDocument alfDocFromDocumentByPath, String aspect) {
if (!alfDocFromDocumentByPath.hasAspect(aspect)) {

Map<String, GregorianCalendar> mapOfAspect = new HashMap<String, GregorianCalendar>();
mapOfAspect.put(aspect, null);
alfDocFromDocumentByPath.addAspect(aspect);
System.out.println(" ##############----Alfresco document Updated for aspect -----------########### : "
+ aspect + " : Document Name : " + alfDocFromDocumentByPath.getName() + "Document Path :"
+ alfDocFromDocumentByPath.getPaths().get(0));
numOfDocUpdatedForAspect++;

} else {

System.out.println(" Aspect is already present: " + aspect + " : Document Path :"
+ alfDocFromDocumentByPath.getPaths().get(0));
}
}

 

 

Here is the exception I am getting 

 

Exception in file :to_collectkeys_apinputgen_adela.bpmn :Not able to update aspect at path : /Sites/vikas/vikasdocument/Itineraries/to_collectkeys_apinputgen_adela.bpmn :: Internal Server Error
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:452)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.put(AbstractAtomPubService.java:595)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.put(AbstractAtomPubService.java:581)
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.updateProperties(ObjectServiceImpl.java:307)
at org.alfresco.cmis.client.impl.AlfrescoUtils.updateAspects(AlfrescoUtils.java:432)
at org.alfresco.cmis.client.impl.AlfrescoAspectsImpl.addAspect(AlfrescoAspectsImpl.java:104)
at org.alfresco.cmis.client.impl.AlfrescoAspectsImpl.addAspect(AlfrescoAspectsImpl.java:96)
at org.alfresco.cmis.client.impl.AlfrescoDocumentImpl.addAspect(AlfrescoDocumentImpl.java:126)
at com.gl.main.CorrectAspectLessFileNewComputeZone.customAspectAdd(CorrectAspectLessFileNewComputeZone.java:94)
at com.gl.main.CorrectAspectLessFileNewComputeZone.main(CorrectAspectLessFileNewComputeZone.java:74)

 

Thanks in Advance for any help.

 

JeffEarley _Angel Borroy

Outcomes