You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Geert Vanheusden <g....@aca-it.be> on 2010/08/05 00:11:51 UTC
Setting empty multiple value field
Dear,
In Alfresco I have the following field:
<property name="foo:test">
<type>d:noderef</type>
<multiple>true</multiple>
</property>
If I try to set the properties but leave this field empty (not setting it), I get the following exception in OpenCMIS.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.apache.chemistry.opencmis.client.runtime.repository.PersistentObjectFactoryImpl.convertProperties(PersistentObjectFactoryImpl.java:463)
I tried to pass an empty List or a list with a null value but they all fail with one of the following exceptions:
* Property 'foo:test' is an Id property!
* Property 'foo:test' contains null values!
Any idea how I can set an empty value for a multiple value field?
Kind regards,
Geert Vanheusden
Re: Setting empty multiple value field
Posted by Geert Vanheusden <g....@aca-it.be>.
Hi Florian,
Thanks for the fix. Now it works!
Kind regards,
Geert
----- Original Message -----
From: "Florian Müller" <fm...@opentext.com>
To: chemistry-dev@incubator.apache.org
Sent: Thursday, August 5, 2010 11:39:02 AM
Subject: RE: Setting empty multiple value field
Hi Geert,
It shouldn't throw an IndexOutOfBoundsException. I've fixed that.
Apart from that, setting a null value or an empty list should work.
Regarding the error messages:
* "Property 'foo:test' is an Id property!": the provided list contained a value that was not a string.
* "Property 'foo:test' contains null values!": the provided list contained a null value which is not allowed by the CMIS spec.
- Florian
-----Original Message-----
From: Geert Vanheusden [mailto:g.vanheusden@aca-it.be]
Sent: Donnerstag, 5. August 2010 00:12
To: chemistry-dev
Subject: Setting empty multiple value field
Dear,
In Alfresco I have the following field:
<property name="foo:test">
<type>d:noderef</type>
<multiple>true</multiple>
</property>
If I try to set the properties but leave this field empty (not setting it), I get the following exception in OpenCMIS.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.apache.chemistry.opencmis.client.runtime.repository.PersistentObjectFactoryImpl.convertProperties(PersistentObjectFactoryImpl.java:463)
I tried to pass an empty List or a list with a null value but they all fail with one of the following exceptions:
* Property 'foo:test' is an Id property!
* Property 'foo:test' contains null values!
Any idea how I can set an empty value for a multiple value field?
Kind regards,
Geert Vanheusden
RE: Setting empty multiple value field
Posted by Florian Müller <fm...@opentext.com>.
Hi Geert,
It shouldn't throw an IndexOutOfBoundsException. I've fixed that.
Apart from that, setting a null value or an empty list should work.
Regarding the error messages:
* "Property 'foo:test' is an Id property!": the provided list contained a value that was not a string.
* "Property 'foo:test' contains null values!": the provided list contained a null value which is not allowed by the CMIS spec.
- Florian
-----Original Message-----
From: Geert Vanheusden [mailto:g.vanheusden@aca-it.be]
Sent: Donnerstag, 5. August 2010 00:12
To: chemistry-dev
Subject: Setting empty multiple value field
Dear,
In Alfresco I have the following field:
<property name="foo:test">
<type>d:noderef</type>
<multiple>true</multiple>
</property>
If I try to set the properties but leave this field empty (not setting it), I get the following exception in OpenCMIS.
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at org.apache.chemistry.opencmis.client.runtime.repository.PersistentObjectFactoryImpl.convertProperties(PersistentObjectFactoryImpl.java:463)
I tried to pass an empty List or a list with a null value but they all fail with one of the following exceptions:
* Property 'foo:test' is an Id property!
* Property 'foo:test' contains null values!
Any idea how I can set an empty value for a multiple value field?
Kind regards,
Geert Vanheusden