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.getStream(QValueFactoryImp l.java:277)
at org.apache.jackrabbit.spi.commons.value.AbstractQValue$1.getStream(AbstractQValue.java:38 0)
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(QValueFactoryImpl.jav a:197)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.setStream(QValueFactoryImp l.java:549)
at org.apache.jackrabbit.spi2davex.ValueLoader.loadBinary(ValueLoader.java:61)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.loadBinary(QValueFactoryIm pl.java:459)
at org.apache.jackrabbit.spi2davex.QValueFactoryImpl$BinaryQValue.getStream(QValueFactoryImp l.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