AnsweredAssumed Answered

Adding Custom Property to nt:file node

Question asked by ajaiking on Jun 13, 2009
Latest reply on Mar 25, 2011 by alexer

When we try to add a custom property to the nt:file node that i created using JCR API. I am getting a Null Pointer Exception.
Also i tried creating a nt:unstructured node, but it seems Alfresco doesn't have a implementation for it.

Kindly guide me how to create a custom property.

The exception that i get while creating a custom property is

Exception in thread "main" java.lang.NullPointerException
   at org.alfresco.jcr.item.PropertyImpl.checkSingleValued(
   at org.alfresco.jcr.item.PropertyImpl.setPropertyValue(
   at org.alfresco.jcr.item.NodeImpl.setProperty(
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.alfresco.jcr.util.JCRProxyFactory$SessionContextInvocationHandler.invoke(
   at $Proxy79.setProperty(Unknown Source)
   at org.alfresco.sample.AlfrescoActions.importFile(
   at org.alfresco.sample.AlfrescoActions.main(

I am in need of this info very urgently.

Ajai G