11-11-2016 07:12 AM
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!
11-11-2016 02:54 PM
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.
11-14-2016 03:50 AM
Thanks Jeff, and sorry for the cross-posting.
11-14-2016 02:03 PM
No worries!
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.