jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bokie <jms.cer...@gmail.com>
Subject prop.setProperty("jcr:data", Bianary)
Date Sat, 09 Apr 2011 18:47:12 GMT
Hi,

I am currently playing around with Jackrabbit 2.2.5 and my test is throwing
the exception shown below when calling: 
  node.setProperty("jcr:data", new BinaryValue(new
FileInputStream(file)).getBinary());
but is working fine when calling:
  node.setProperty("jcr:data", new BinaryValue(new
FileInputStream(file)).getStream());

NOTE:
Node.setProperty(String, InputStream) is marked as deprecated.

############### Exception start #####################
org.apache.jackrabbit.rmi.client.RemoteRepositoryException:
java.rmi.MarshalException: error marshalling arguments; nested exception is: 
	java.io.NotSerializableException: org.apache.jackrabbit.value.BinaryImpl
	at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:134)
	at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:236)
	at jmdsc.jackrabbit.Main.addFileNode(Main.java:72)
	at jmdsc.jackrabbit.Main.test1(Main.java:38)
	at jmdsc.jackrabbit.Main.main(Main.java:21)
Caused by: java.rmi.MarshalException: error marshalling arguments; nested
exception is: 
	java.io.NotSerializableException: org.apache.jackrabbit.value.BinaryImpl
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:138)
	at org.apache.jackrabbit.rmi.server.ServerNode_Stub.setProperty(Unknown
Source)
	at
org.apache.jackrabbit.rmi.client.ClientNode.setProperty(ClientNode.java:129)
	... 4 more
Caused by: java.io.NotSerializableException:
org.apache.jackrabbit.value.BinaryImpl
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
	at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
	at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
	at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
############### Exception end #####################


--
View this message in context: http://jackrabbit.510166.n4.nabble.com/prop-setProperty-jcr-data-Bianary-tp3438835p3438835.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Mime
View raw message