08-26-2010 08:38 AM
import javax.jcr.Node;
import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;
public class Alfresco {
public static void main(String[] args) {
String result = "";
try {
ApplicationContext context = new ClassPathXmlApplicationContext("classpath:alfresco/application-context.xml");
Repository repository = (Repository)context.getBean("JCR.Repository");
//
// SimpleCredentials credentials = new SimpleCredentials("admin", "admin".toCharArray());
// Session session = repository.login(credentials);
// Node rootNode = session.getRootNode();
// result = "Root node: path=" + rootNode.getPath() + ", type=" + rootNode.getPrimaryNodeType().getName();
//
} catch (Exception e) {
System.out.println("Error: " + e.getMessage());
}
System.out.println(result);
}
}
14:25:16,109 INFO [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/repository.properties]
14:25:16,125 INFO [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from class path resource [alfresco/domain/transaction.properties]
14:25:16,125 INFO [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [D:\alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\module\test\alfresco-global.properties]
14:25:16,125 INFO [alfresco.config.JndiPropertiesFactoryBean] Loading properties file from file [D:\alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\module\tests\alfresco-global.properties]
14:25:16,140 INFO [alfresco.config.JndiPropertyPlaceholderConfigurer] Loading properties file from class path resource [alfresco/alfresco-shared.properties]
Error: Error creating bean with name 'checkOutCheckInService' defined in class path resource [alfresco/core-services-context.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'policyComponent' of bean class [org.alfresco.repo.coci.CheckOutCheckInServiceImpl]: Bean property 'policyComponent' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
08-30-2010 08:52 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.