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?
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.