jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christophe Lombart" <christophe.lomb...@gmail.com>
Subject Re: OCM: are beans and collections allowed inside of collections?
Date Wed, 06 Feb 2008 19:58:09 GMT
Did you register the class IncomingNode ?
It seems that OCM didn't find it ClassDescriptor.
like

List classes = new ArrayList();
classes.add(IncomingNode.class); // Call this method for each persistent class
classes.add(UserHome.class);
				
// 3. Instantiate the object content manager
Mapper mapper = new AnnotationMapperImpl(classes);
ObjectContentManager ocm = new ObjectContentManagerImpl(session, mapper);




On Feb 6, 2008 5:50 PM, Alex Lukin <lukin@stu.cn.ua> wrote:

> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message