02-28-2016 09:30 AM
Map<String, String> parameter = new HashMap<String, String>();
// user credentials
parameter.put(SessionParameter.USER, config.getALFRESCO_USR());
parameter.put(SessionParameter.PASSWORD, config.getALFRESCO_PASS());
// connection settings
parameter.put(SessionParameter.ATOMPUB_URL, config.getSERVICE_URL());
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
// Set the alfresco object factory
// Used when using the CMIS extension for Alfresco for working with
// aspects
parameter.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
// default factory implementation
SessionFactory factory = SessionFactoryImpl.newInstance();
List<Repository> repositories = factory.getRepositories(parameter);
log.info("ALFRESCO repository :{}", repositories.get(0).getId());
session = repositories.get(0).createSession();
log.info("ALFRESCO session created :{}", session);
urudjbeni = (Folder) session.getObjectByPath("/Shared/Urudjbeni");
log.info("ALFRESCO urudjbeni folder:{}", urudjbeni);
Caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Property 'cm:title' doesn't exist!
at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperty(ObjectFactoryImpl.java:240)
at org.apache.chemistry.opencmis.client.runtime.repository.ObjectFactoryImpl.convertProperties(ObjectFactoryImpl.java:263)
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertProperties(AlfrescoObjectFactoryImpl.java:206)
at org.apache.chemistry.opencmis.client.runtime.AbstractCmisObject.initialize(AbstractCmisObject.java:108)
at org.alfresco.cmis.client.impl.AlfrescoFolderImpl.initialize(AlfrescoFolderImpl.java:46)
at org.apache.chemistry.opencmis.client.runtime.FolderImpl.<init>(FolderImpl.java:68)
at org.alfresco.cmis.client.impl.AlfrescoFolderImpl.<init>(AlfrescoFolderImpl.java:39)
at org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl.convertObject(AlfrescoObjectFactoryImpl.java:297)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:424)
at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObjectByPath(SessionImpl.java:398)
at hr.igvu.dms.service.impl.Alfresco.init(Alfresco.java:80)
at hr.igvu.dms.service.impl.Alfresco.<init>(Alfresco.java:52)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
… 25 more
02-28-2016 02:25 PM
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.