AnsweredAssumed Answered

openCMIS getFolder Error. Object Info is missing!

Question asked by iruizdeeguilaz on Feb 5, 2014
Latest reply on Feb 7, 2014 by iruizdeeguilaz
I have an Alfresco Comunnity Release 4.0.d.

I have done a lof of things with openCMIS without problems… (upload docs, searchs…)

Today I have made some changes in the Alfreso adding a Multi-Tenant Configuration…

I have defined two tenants called myTenantA and myTenantb, and a dynamic model for the myTenantA  and it works  fine,I only see my types on myTenantA (neither myTenantb nor original space whithout tenant login).

I was able to create from opencmis a document of that specficic type and ok… but after a while it started to send back and error….

org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Object Info is missing!

my code:

SessionFactory factory = SessionFactoryImpl.newInstance();
           Map<String, String> parameters = new HashMap<String, String>();
           // user credentials
           parameters.put(SessionParameter.USER, "xxxx@myTenantA");  /// tenant myTenantA
           parameters.put(SessionParameter.PASSWORD, "xxxxx");
           // connection settings
           parameters.put(SessionParameter.ATOMPUB_URL,  "http://ip:8080/alfresco/cmisatom" );
           parameters.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
           // para los aspectos
           parameters.put(SessionParameter.OBJECT_FACTORY_CLASS, "org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl");
           // create session
           session =  factory.getRepositories(parameters).get(0).createSession();
           Folder root = session.getRootFolder();

here when it tries to get a folder is when it fails…

it seems to be a probem with getObjectInfo()… but I don't know why

I am be able to make sqls from opencmis like this

ItemIterable<QueryResult> results = session.query("SELECT * FROM cmis:folder WHERE cmis:name='testdata'", false);

the things what I was doing in the time that it started to fail were changing the between the data dictionary/messages and data dyctionary/web client extension spaces because i couldn't see the properties of my metadata changed properly on Explorer ( I dind`t get it but it isn´t a big problem)

I have deleted the tenats and defined them again (in other root contentstore dir) and I have suffer the same situation… after a time it started to fail in the same thing….

is there any way to check if there is any inonsistency o something worg with CMIS (server side) or the tenants? because I can get a folder if y my SessionParameter.USER use the user without @
do you recommend me to try with other way to work with Alfresco in order to upload, search and do that kind of things in a java app?

thanks so much