AnsweredAssumed Answered

NullPointer in CMIS Session getObject - Apache Chemistry

Question asked by victorba on Nov 11, 2016
Latest reply on Nov 14, 2016 by jpotts

Hi, I am facing a NullPointerException doing a Session getObject in Apache Chemistry OpenCmis 0.10.0.
I am also using Alfresco OpenCmis extension 0.6.

This is the code used:

OperationContext context = getSessionManager().getSession().createOperationContext();
context.setCacheEnabled(true);
context.setIncludeRelationships(IncludeRelationships.NONE);
CmisObject object = getSessionManager().getSession().getObject(uuid, context);

And this is the stacktrace:

java.lang.NullPointerException
at java.util.LinkedHashMap.get(LinkedHashMap.java:332)
at org.apache.chemistry.opencmis.client.bindings.cache.impl.AbstractMapCacheLevel.get(AbstractMapCacheLevel.java:40)
at org.apache.chemistry.opencmis.client.bindings.cache.impl.CacheImpl.get(CacheImpl.java:161)
at org.apache.chemistry.opencmis.client.bindings.impl.TypeDefinitionCache.get(TypeDefinitionCache.java:94)
at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:129)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:525)
at org.alfresco.cmis.client.impl.AlfrescoUtils.getAspectTypes(AlfrescoUtils.java:99)
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:269)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.initialize(AbstractCmisObject.java:132)
at org.alfresco.cmis.client.impl.AlfrescoDocumentImpl.initialize(AlfrescoDocumentImpl.java:50)
at org.apache.chemistry.opencmis.client.runtime.DocumentImpl.<init>(DocumentImpl.java:59)
at org.alfresco.cmis.client.impl.AlfrescoDocumentImpl.<init>(AlfrescoDocumentImpl.java:44)
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertObject(AlfrescoObjectFactoryImpl.java:346)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:414)

It seems that the nullpointer is happening in the CMIS cache, have you ever seen this error? I have searched in forums, but I haven't seen this error.

Thanks!

Outcomes