AnsweredAssumed Answered

JSR-170 issue

Question asked by s0110655 on Apr 26, 2006
Hi all,

I'm a student in the computerscience and I developed an application on top of jackrabbit for my thesis.  I followed the JSR-170 standard to access jackrabbit.  Now I want to put another CMS under my application without having to change all my code.  I've chosen Alfresco as my new CMS.  I have a problem with the setProperty method from the JSR-170 spec.  I have the following line of code in my project:

rn.setProperty("Propname","PropValue");

I just want to set a property with name "Propname" and value "Propvalue" to the node rn.  In jackrabbit this works fine, but in Alfresco I get a NullPointerException.  After some experimenting I found a way to set the property with the following line of code:

rn.setProperty("cm:content","PropValue");

I guess this has something to do with namespaces.  But I already used this method a thousand times in my project and I want to reuse my code without any modifications.  Is there a way you can set a property with a name that doesn't have to be a namespace?

Thanks for your help!
Steven

Outcomes