incubator-graffito-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruchi Goel <Ruchi.G...@Sun.COM>
Subject Error using DefaultCollectionConverter
Date Mon, 09 Oct 2006 10:10:46 GMT
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

Mime
View raw message