02-07-2007 09:23 AM
public class Tag extends SamplesBase
{
static FacesContext context = FacesContext.getCurrentInstance();
static NodeService nodeService = Repository.getServiceRegistry(context).getNodeService();
//static NodeService nodeService;
static StoreRef storeRef;
public static void main(String[] args)
throws Exception
{
// Start the session
AuthenticationUtils.startSession(USERNAME, PASSWORD);
try
{
// Make sure smaple data has been created
createSampleData();
NodeRef nodeRef = nodeService.getRootNode(storeRef);
NodeRef categoryRef = (NodeRef)nodeService.getProperty(nodeRef, QName.createQName("{extension.tags}", "tags"));
}
finally
{
// End the session
AuthenticationUtils.endSession();
}
}
java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at org.springframework.web.jsf.FacesContextUtils.getWebApplicationContext(FacesContextUtils.java:47)
at org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext(FacesContextUtils.java:77)
at org.alfresco.web.bean.repository.Repository.getServiceRegistry(Repository.java:404)
at org.alfresco.sample.webservice.Tag.<clinit>(Tag.java:61)
Exception in thread "main" 02-08-2007 06:17 AM
02-08-2007 08:12 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.