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: strange exceptions again
Date Wed, 06 Feb 2008 11:47:45 GMT
Hi!
This code:

@Node
public class UsersNode {
    @Field (path=true) String path = "users";
    @Field long version = 1L;
    @Field Date modfied;
    @Collection(elementClassName=UserNode.class) 
    private ArrayList<UserNode> userNodes = new ArrayList<UserNode>();

Where UserNode is simple class marked as @Node with atcomic fields marked as @Field. It gives
exception when I do ocm.insert(node); What ic could be?

org.apache.jackrabbit.ocm.exception.IncorrectAtomicTypeException: No registered converter
for a field based on the class :'class [Ljava.lang.String;'
        at org.apache.jackrabbit.ocm.manager.atomictypeconverter.impl.AtomicTypeConverterProviderImpl.getAtomicTypeConverter(AtomicTypeConverterProviderImpl.java:73)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.SimpleFieldsHelper.getAtomicTypeConverter(SimpleFieldsHelper.java:302)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.SimpleFieldsHelper.storeSimpleField(SimpleFieldsHelper.java:233)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.SimpleFieldsHelper.storeSimpleFields(SimpleFieldsHelper.java:199)
        at org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.insert(ObjectConverterImpl.java:219)
        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)

I think that excpetions in current OCM implementation are not informative. May be check of
proper mapping must be done 
not at insert operation but when mapper is created.

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

Mime
View raw message