Currently I need to retrieve "files" from CRX. This means I get me the jcr:data property of the jcr:content-child-node of a nt:file-node.I do this in a loop, but after a while I get an Exception:
Exception in thread "main" javax.jcr.RepositoryException: java.io.IOException: No space left on device
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.getStr eam(QValueFactoryImpl.java:277)
at org.apache.jackrabbit.spi.commons.value.AbstractQValue$1.getStream(Ab stractQValue.java:380)
at com.lsy.privatebase.virusscan.pbase.PBaseObject.getFileDirect(Unknown Source)
at com.lsy.privatebase.virusscan.pbase.PBaseObject.getFile(Unknown Source)
at com.lsy.privatebase.virusscan.samples.DownloadLoopFile.<init>(Unknown Source)
at com.lsy.privatebase.virusscan.samples.DownloadLoopFile.main(Unknown Source)
Caused by: java.io.IOException: No space left on device
at java.io.FileOutputStream.writeBytes(Native Method)
at java.io.FileOutputStream.write(FileOutputStream.java:297)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.init(Q ValueFactoryImpl.java:197)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.setStr eam(QValueFactoryImpl.java:549)
at org.apache.jackrabbit.spi2davex.ValueLoader.loadBinary(ValueLoader.ja va:61)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.loadBi nary(QValueFactoryImpl.java:459)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.getStr eam(QValueFactoryImpl.java:275)
... 5 more
If I try the failing file first then it is fine. The problem must come from the repository itself - for my tests I don't download the file just issuing
Node filenode = Node.getNode("jcr:content");
Property jcrdata = filenode.getProperty("jcr:data");
InputStream is = jcrdata.getBinary().getStream();
The files are rather big - almost 50-100MB in size.
Ulrich