jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From philip andrew <philip14...@gmail.com>
Subject Jackrabbit OCM adding fields, getting exception
Date Sun, 11 Apr 2010 11:27:13 GMT
Hi,

I want to add two new fields to my object.
However at the moment, each time my program starts it gets a object from the
Jackrabbit using the OCM.

Now when I added two new fields, I get this error.

2010-04-11 19:14:28.676:WARN:/:unavailable
org.apache.jackrabbit.ocm.exception.JcrMappingException: Cannot set the
field linkPage in the class : com.orsa.seam.model.jcrnode.OPageNode; nested
exception is java.lang.IllegalArgumentException: Cannot invoke
com.orsa.seam.model.jcrnode.OPageNode.setLinkPage - null
at
org.apache.jackrabbit.ocm.reflection.ReflectionUtils.setNestedProperty(ReflectionUtils.java:161)
at
org.apache.jackrabbit.ocm.manager.objectconverter.impl.SimpleFieldsHelper.retrieveSimpleField(SimpleFieldsHelper.java:209)
at
org.apache.jackrabbit.ocm.manager.objectconverter.impl.SimpleFieldsHelper.retrieveSimpleFields(SimpleFieldsHelper.java:117)
at
org.apache.jackrabbit.ocm.manager.objectconverter.impl.ObjectConverterImpl.getObject(ObjectConverterImpl.java:395)
at
org.apache.jackrabbit.ocm.manager.impl.ObjectContentManagerImpl.getObject(ObjectContentManagerImpl.java:264)

where I called from at my program startup:
    OPageNode obj = (OPageNode) ocm.getObject(cmsRootPath);

I wanted to add:
  @BeanProperty
  @Field var linkPage:Boolean = false

  @BeanProperty
  @Field var linkUrl:String = _

to my class:
@Node{val jcrType="nt:orsacms_page"}
class OPageNode extends OAbstractNode

... oh, this is Scala, but I am sure you can think of the same in Java.

I guess I get this error because the two new fields in the class are not in
the jackrabbit repository.

So... what can I do to add two new fields?

Thanks!, Philip

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message