incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <the.mindstorm.mailingl...@gmail.com>
Subject Re: Error using DefaultCollectionConverter
Date Mon, 09 Oct 2006 10:24:45 GMT
On 10/9/06, Ruchi Goel <Ruchi.Goel@sun.com> wrote:
> Hi,
>    I  have
>  class A {
> String path = "/test";
>      Collection links =   new ArrayList();
>
> public Collection getLinks()
>   return links;
> }
>
> public void setLinks(Collection links){
>    this.links = links;
> }
>
> mapping file as follows:
>
> <graffito-jcr>
> <class-descriptor className="com.sun.portal.cms.A"
> jcrNodeType="nt:unstructured" discriminator="false" >
> <!-- Field-descriptor is used to map simple attributes to jcr property -->
>     <field-descriptor fieldName="path" path="true" />
>     <collection-descriptor fieldName="links" jcrName="links"
> elementClassName="java.lang.String" />
>
>
> </class-descriptor>
> </graffito-jcr>
>
>
> I want  DefaultCollectionConverterImpl to be used when I try
> persistenceManager.insert(a);.
> While debugging , I see in DefaultCollectionConverterImpl , the line
>  ClassDescriptor elementClassDescriptor =
> mapper.getClassDescriptorByClass(
> ReflectionUtils.forName(collectionDescriptor.getElementClassName()));
> returns null
>
> .
>
> However, I do not face any problem if I use collectionConverter :
> MultiValueCollectionConverter..
>
> Is there anything I am missing ?
>
> Help appreciated.
> Thanks,
> Ruchi
>

It looks like it is looking for another BeanConverter instead.
Unfortunately, I don't have access to the sourcecode right now to
check what is wrong or if it is supposed to work this way.

./alex
--
.w( the_mindstorm )p.

Mime
View raw message