Greetings,

I am running into a NPE trying to get the root folder from an Alfresco cmis thru chemistry 0.10.0.

I'm assuming that there is some sort of configuration missing on my part, but i'm not sure how to debug further.

Basically, when calling Session.getRootFolder it gets to

SessionImpl getObject(ObjectId objectId, OperationContext context);

where it fetches ObjectData, that looks like this:

Object Data [properties=Properties Data [properties=[]][extensions=[{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId {null=cmis:allowedChildObjectTypeIds}: , {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId {null=cmis:objectTypeId}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: cmis:folder], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString {null=cmis:path}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: /], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString {null=cmis:name}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: Company Home], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyDateTime {null=cmis:creationDate}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: 2013-11-18T19:22:26.382+05:30], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString {null=cmis:changeToken}: , {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString {null=cmis:lastModifiedBy}:
[{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: System], 
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString 
{null=cmis:createdBy}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value 
{}: System], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId 
{null=cmis:objectId}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value 
{}: workspace://SpacesStore/03ceb69e-5168-4f1c-a3b4-64cbb2ad4bf7], 
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId 
{null=cmis:baseTypeId}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value 
{}: cmis:folder], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId 
{null=alfcmis:nodeRef}: [{http://docs.oasis-open.org/ns/cmis/core/200908/}value 
{}: workspace://SpacesStore/03ceb69e-5168-4f1c-a3b4-64cbb2ad4bf7], 
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyDateTime 
{null=cmis:lastModificationDate}: 
[{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: 
2013-11-18T19:44:23.898+05:30],
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyId 
{null=cmis:parentId}: , {http://www.alfresco.org}aspects {}: 
[{http://www.alfresco.org}appliedAspects {}: P:app:uifacets, 
{http://www.alfresco.org}properties {}: 
[{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString 
{propertyDefinitionId=app:icon}: 
[{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: 
space-icon-default], 
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString 
{propertyDefinitionId=cm:description}: 
[{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: The company root 
space], {http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString 
{propertyDefinitionId=cmis:policyText}: , 
{http://docs.oasis-open.org/ns/cmis/core/200908/}propertyString 
{propertyDefinitionId=cm:title}: 
[{http://docs.oasis-open.org/ns/cmis/core/200908/}value {}: Company Home]], 
{http://www.alfresco.org}appliedAspects {}: P:cm:titled, 
{http://www.alfresco.org}appliedAspects {}: P:sys:localized]]], allowable
actions=Allowable Actions [allowable actions=[CAN_UPDATE_PROPERTIES, 
CAN_GET_FOLDER_TREE, CAN_GET_PROPERTIES, CAN_GET_OBJECT_RELATIONSHIPS, 
CAN_GET_DESCENDANTS, CAN_GET_APPLIED_POLICIES, CAN_GET_CHILDREN, 
CAN_CREATE_DOCUMENT, CAN_CREATE_FOLDER, CAN_CREATE_RELATIONSHIP, CAN_GET_ACL, 
CAN_APPLY_ACL]][extensions=null], change event info=null, ACL=null, is exact 
ACL=null, policy ids=null, relationships=[], renditions=[]][extensions=null]

It then switches on the objectData's baseTypeId

which uses the entry in the properties.properties object as

PropertyData<?> property = properties.getProperties().get("cmis:baseTypeId");

but as you can see above the properties.properties collection is empty.

since the value returned is null, the switch NPEs on me.

So i'm not sure why the properties.properties collection is empty.

Any help would be greatly appreciated.

dave
--
<br type="_moz" />


Reply via email to