03-24-2010 08:00 AM
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
LuceneCategoryServiceImpl categoryServiceImpl = new LuceneCategoryServiceImpl();
Collection<ChildAssociationRef> listOfCategories = categoryServiceImpl.getCategories(storeRef , QName.createQName("{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1...."), CategoryService.Depth.ANY);
java.lang.NullPointerException
at org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getClassificationNodes(LuceneCategoryServiceImpl.java:284)
at org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl.getCategories(LuceneCategoryServiceImpl.java:274)
at com.jindal.alfresco.km.constraints.CommunitySearchConstraint.getAllowedValues(CommunitySearchConstraint.java:162)
private Set<NodeRef> getClassificationNodes(StoreRef storeRef, QName qname)
{
storeRef = tenantService.getName(storeRef); <– Line no 284
ResultSet resultSet = null;
….
StoreRef storeRef =new StoreRef("workspace://SpacesStore/{http://www.alfresco.org/model/content/1.0}categoryRoot");
StoreRef storeRef =new StoreRef("workspace://SpacesStore/");{http://www.alfresco.org/model/content/1.0}category_root");
03-24-2010 01:12 PM
<bean id="…." class="org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl">
….
<property name="tenantService">
<ref bean="tenantService"/>
</property>
….
</bean>
Regards,03-25-2010 01:09 AM
<bean id="luceneCategoryService" class="org.alfresco.repo.search.impl.lucene.LuceneCategoryServiceImpl">
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="publicNodeService">
<ref bean="NodeService" />
</property>
<property name="tenantService">
<ref bean="tenantService"/>
</property>
<property name="dictionaryService">
<ref bean="dictionaryService" />
</property>
<property name="namespacePrefixResolver">
<ref bean="namespaceService" />
</property>
<property name="indexerAndSearcher">
<ref bean="indexerAndSearcherFactory" />
</property>
</bean>
StoreRef storeRef =new StoreRef("workspace://SpacesStore/{http://www.alfresco.org/model/content/1.0}/cm:generalclassifiable");
Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
03-25-2010 07:23 AM
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
or
StoreRef storeRef = new StoreRef("workspace://SpacesStore");
or even
StoreRef storeRef = StoreRef.STORE_REF_WORKSPACE_SPACESSTORE;
Regards,03-25-2010 07:43 AM
StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext
04-05-2010 12:37 AM
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.