chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: NullPointer in CMIS Session getObject - Apache Chemistry
Date Fri, 11 Nov 2016 12:59:12 GMT
Hi,

I've never seen that before. It looks like the Alfresco OpenCMIS 
Extension passed null to the getTypeDefinition method and that 
eventually triggers the NullPointerException. You should contact 
Alfresco.

Apart from that, you should consider updating your OpenCMIS library and 
switch to the Browser Binding. Your library version is pretty old and 
the Browser Binding should give you better performance.


- Florian


> 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!

Mime
View raw message