jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Lukin <lu...@stu.cn.ua>
Subject OCM: are beans and collections allowed inside of collections?
Date Wed, 06 Feb 2008 16:50:07 GMT
Hi again!
I know I write here too often but there's no other place to get info...

I'm trying  to use @Bean node inside of node that delcared as @Collection like this:

public class UserHome{
    @Field (path=true) String path;
    @Field long version = 1L;
    @Field(id=true) String login;
    @Bean IncomingNode incoming = new IncomingNode();

IncomingNode annotated as @Node with few @Field lines.

and OCM throws exception:

 org.apache.jackrabbit.ocm.exception.IncorrectPersistentClassException: Class of type: ua.org.dg.semaril.auth.IncomingNode
has no descriptor.
        at org.apache.jackrabbit.ocm.mapper.impl.AbstractMapperImpl.getClassDescriptorByClass(AbstractMapperImpl.java:177)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insertBeanFields(ObjectConverterImpl.java:720)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:220)
        at org.apache.jackrabbit.ocm.manager.collectionconverter.impl.DefaultCollectionConverterImpl.doInsertCollection(DefaultCollectionConverterImpl.java:126)
        at org.apache.jackrabbit.ocm.manager.collectionconverter.impl.AbstractCollectionConverterImpl.insertCollection(AbstractCollectionConverterImpl.java:80)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insertCollectionFields(ObjectConverterImpl.java:782)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:221)
        at org.apache.jackrabbit.ocm.manager.beanconverter.impl.DefaultBeanConverterImpl.insert(DefaultBeanConverterImpl.java:53)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insertBeanFields(ObjectConverterImpl.java:720)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:220)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:146)
        at org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl.insert(ObjectContentManagerImpl.java:406)
...
May be recursive behavior is not applicable to @Collection types? 
Code works if there's only @Field lines in UserHome declaration.

Is there way to create/access subnodes in collections by 
OCM or methods or Node class must be used directly without OCM?

-- 
SY, Alex Lukin
RIPE NIC HDL: LEXA1-RIPE

Mime
View raw message