Category Archives: apache-chemistry

getting CmisInvalidArgumentException: Extensions tree too wide! while using apache chemistry opencmis

I am a newbie to Apache Chemistry openCMIS.

I am trying to pull a PDF document from the Alfresco repository using its Id. The id is something similar to workspace://SpacesStore/b91dc42c-1644-4246-b3x9-bxx6f0be4wf3

CmisObject object = getSession().getObject(Id);

I am getting the below exception while execute the above line.

org.apache.chemistry.opencmis.commons.exceptions.CmisConnectionException: Parsing exception!

The Exception object does not contain the stackTrace and it contains the cause as below.

org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Extensions tree too wide!

But, I dont understand what I am missing. I have another drupal application, that pulls the same PDF without any issue. But this issue happens when I do it thru my java program.

Can anyone please help me out find what I am doing wrong?

UPDATE (ATTACHING THE CODE)

SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.USER, "test");
parameter.put(SessionParameter.PASSWORD, "test");
parameter.put(SessionParameter.ATOMPUB_URL, "http://myurl.com/alfresco/service/cmis");

parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
parameter.put(SessionParameter.LOCALE_ISO3166_COUNTRY, "us");
parameter.put(SessionParameter.LOCALE_ISO639_LANGUAGE, "en");
parameter.put(SessionParameter.LOCALE_VARIANT, "");

// Cache config
parameter.put(SessionParameter.CACHE_SIZE_REPOSITORIES, 0);
parameter.put(SessionParameter.CACHE_SIZE_TYPES, 100);
parameter.put(SessionParameter.CACHE_SIZE_OBJECTS, 1000);

//timeout config
parameter.put(SessionParameter.CONNECT_TIMEOUT, 20000);
parameter.put(SessionParameter.READ_TIMEOUT, 60000);
try
{
    Repository soleRepository = (Repository)sessionFactory.getRepositories(parameter).get(0);
    session = soleRepository.createSession();
}
catch(CmisConnectionException e)
{
}
catch(CmisRuntimeException e)
{
}
catch(Exception e)
{
}
session.setDefaultContext(operationContext);

String Id = "workspace://SpacesStore/b91dc42c-1644-4246-b3x9-bxx6f0be4wf3";

CmisObject object = session.getObject(Id);

How to deploy an Apache Chemistry OpenCMIS server in Wildfly 8.2.0?

I am trying to deploy the InMemory Repository of the Apache Chemistry OpenCMIS in Wildfly, but I am having an issue with the deployment. Although the solution to it is explained in some sites, I can't understand what exactly needs to be done, since I am a newbie at all this server configuration, class-loading etc.

The issue is as described here: Apache Chemistry OpenCMIS server won't deploy on JBoss AS 7 (I've tried the solution the author suggested, didn't work, same error)

And the answer to it is found here: https://issues.apache.org/jira/browse/CMIS-738

The solution sounds simple enough even to me: "The OpenCMIS server only works (for several reasons) only with Sun JAX-WS RI. Disable CXF for this webapp and add the Sun JAX-WS RI jars."

I feel dumb for asking this, but here it goes: what exactly is he asking me to do here? How exactly do I disable CXF specifically for the OpenCMIS InMemory Repository and use only Sun JAX-WS RI?

I've experimented a lot and saw that getting rid of the webservices subsystem in the standalone.xml makes it possible for me to deploy, but then all the other deployments I have that need the webservices won't work.

Thanks in advance for whatever help I can get.

How to deploy an Apache Chemistry OpenCMIS server in Wildfly 8.2.0?

I am trying to deploy the InMemory Repository of the Apache Chemistry OpenCMIS in Wildfly, but I am having an issue with the deployment. Although the solution to it is explained in some sites, I can't understand what exactly needs to be done, since I am a newbie at all this server configuration, class-loading etc.

The issue is as described here: Apache Chemistry OpenCMIS server won't deploy on JBoss AS 7 (I've tried the solution the author suggested, didn't work, same error)

And the answer to it is found here: https://issues.apache.org/jira/browse/CMIS-738

The solution sounds simple enough even to me: "The OpenCMIS server only works (for several reasons) only with Sun JAX-WS RI. Disable CXF for this webapp and add the Sun JAX-WS RI jars."

I feel dumb for asking this, but here it goes: what exactly is he asking me to do here? How exactly do I disable CXF specifically for the OpenCMIS InMemory Repository and use only Sun JAX-WS RI?

I've experimented a lot and saw that getting rid of the webservices subsystem in the standalone.xml makes it possible for me to deploy, but then all the other deployments I have that need the webservices won't work.

Thanks in advance for whatever help I can get.

CMIS – Searching list properties

With CMIS I can add a property to an object. The property can have one value or it can be a multi-value property. When you have a multi-value property on a number of objects, how do you search for all objects that has this property and the property contains a specific value or a number of specific values?

For example. (Example taken from here)

CmisObject cmisobject = ....

Map<String, Object> updateProperties = new HashMap<String, Object>();

List<String> shoppingList = new ArrayList<String>();
shoppingList.add("milk");
shoppingList.add("bread");
shoppingList.add("cheese");
updateProperties.put("my:shopping.list", shoppingList); // multi-value property

cmisobject.updateProperties(updateProperties);

Now, if I wish to perform a query for all objects that has the property my:shopping.list and where the property contains the value bread or the values milk AND cheese, how would I do this?