10-17-2006 01:15 PM
ApplicationContext app_ctx = ApplicationContextHelper.getApplicationContext();
//Getting Service Registry
final ServiceRegistry reg = (ServiceRegistry) app_ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
if (reg.isServiceProvided(ServiceRegistry.NODE_SERVICE)){
//Create a user transaction explicitly
TransactionService trx_srvc = reg.getTransactionService();
TransactionWork trx_wrk = new TransactionWork(){
public NodeRef doWork() throws Exception{
//Get Node Service from registry
NodeService node_srvc = reg.getNodeService();
//Authenticate as admin
AuthenticationService authenticationService = reg.getAuthenticationService();
authenticationService.authenticate("admin", "admin".toCharArray());
//Create store
StoreRef users_store = CreateStore(node_srvc, store_name);
//Crete folder in store
NodeRef folder_ref = AddFolderToStore(node_srvc, users_store, folder_name);
return folder_ref;
}
};
TransactionUtil.executeInUserTransaction(trx_srvc, trx_wrk);
}
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [alfresco/application-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] cannot be opened because it does not exist
java.io.FileNotFoundException: class path resource [alfresco/application-context.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:137)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:167)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:148)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:81)
at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:269)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
at org.alfresco.util.ApplicationContextHelper.getApplicationContext(ApplicationContextHelper.java:40)
at p2.processAction(p2.java:295)
…
10-26-2006 12:29 PM
03-25-2009 11:35 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.