我正面临在Apache Chemistry OpenCmis 0.10.0中执行Session getObject的NullPointerException。 我也在使用Alfresco OpenCmis扩展0.6。
这是使用的代码:
OperationContext context = getSessionManager().getSession().createOperationContext();
context.setCacheEnabled(true);
context.setIncludeRelationships(IncludeRelationships.NONE);
CmisObject object = getSessionManager().getSession().getObject(uuid, context);
这是堆栈跟踪:
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)
似乎null指针发生在CMIS缓存中,你见过这个错误吗?我在论坛上搜索过,但我还没有看到这个错误。
谢谢!
答案 0 :(得分:0)
使用logidoc社区版时我遇到了类似的错误。由于我从logidoc网站获得的服务URL发生错误。如果你的用户名和密码没问题,那么罪魁祸首可能就是服务网址。