cancel
Showing results for 
Search instead for 
Did you mean: 

NullPointer in CMIS Session getObject - Apache Chemistry

victorba
Champ in-the-making
Champ in-the-making

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!

3 REPLIES 3

jpotts
World-Class Innovator
World-Class Innovator

This is cross-posted here: java - NullPointer in CMIS Session getObject - Apache Chemistry - Stack Overflow 

Victor, rather than cross-posting, please pick a channel and stick with it as many people follow both.

victorba
Champ in-the-making
Champ in-the-making

Thanks Jeff, and sorry for the cross-posting.

jpotts
World-Class Innovator
World-Class Innovator