jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dhrubo <dhrubo.ka...@gmail.com>
Subject Re: Jackrabbit OCM adding fields, getting exception
Date Tue, 13 Apr 2010 15:36:21 GMT
Yes you need get/sets

On Tue, Apr 13, 2010 at 9:02 PM, Woonsan Ko <woon_san@yahoo.com> wrote:

> The following tutorial could help you if I understand it correctly:
>
> http://jackrabbit.apache.org/5-with-jackrabbit-ocm.html
>
> Also, I guess you need public getter/setter for the fields also.
>
>
> Woonsan
>
>
> ----- Original Message ----
> > From: philip andrew <philip142au@gmail.com>
> > To: users@jackrabbit.apache.org
> > Sent: Sun, April 11, 2010 1:27:13 PM
> > Subject: Jackrabbit OCM adding fields, getting exception
> >
> > 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
>
>
>
>


-- 
Thanks ... Dhrubo
My Book - http://www.apress.com/book/view/1430210095

My Blog -
http://www.jtraining.com/blogs/blogger/dhrubo/

LinkedIn - http://www.linkedin.com/in/dhrubo

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