AnsweredAssumed Answered

Doubts on JCR-RMI

Question asked by rcortesr on Nov 16, 2006
Latest reply on Nov 20, 2006 by davidc
Hi,

For to use JCR-RMI I must install jackrabbit? How I can do it?
There is some example for to add nodes in de repository using RMI?

I have another doubt: why it appears the following error when execute my code?

ERROR:
[size=75]Exception in thread "main" java.lang.NullPointerException
   at org.alfresco.jcr.item.PropertyImpl.checkSingleValued(PropertyImpl.java:630)
   at org.alfresco.jcr.item.PropertyImpl.setPropertyValue(PropertyImpl.java:509)
   at org.alfresco.jcr.item.NodeImpl.setProperty(NodeImpl.java:354)
   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(JCRProxyFactory.java:130)
   at $Proxy68.setProperty(Unknown Source)
   at org.alfresco.sample.jcr.Main.main(Main.java:61)[/size]


MY CODE:
[size=75]Node facturas = myNode.addNode("fac:facturas", "cm:folder");
            facturas.setProperty("cm:name", "Facturas");
               facturas.setProperty("cm:description", "");
              
               Node fac1 = facturas.addNode("fac:entry1", "fac:factura");
               fac1.setProperty("cm:name", "Factura1");
               fac1.setProperty("cm:description", "pruebaaaaa");
               fac1.setProperty("cm:title", "mi primera factura");
               fac1.setProperty("cm:content", "hola holaaaaaaaa");
               fac1.setProperty("fac:NIF_proveedor", "13434");[/size]


fac is the prefix of my custom model of content. The problems appears when I set a custom property.

Thanks.

Outcomes