Hello everyone,
i am getting this null pointer exception when i am updating a content
node with file data.
java.lang.NullPointerException
at
org.apache.jackrabbit.core.value.BLOBInTempFile.delete(BLOBInTempFile.ja
va:119)
at
org.apache.jackrabbit.core.value.BLOBInTempFile.discard(BLOBInTempFile.j
ava:129)
at
org.apache.jackrabbit.core.PropertyImpl.internalSetValue(PropertyImpl.ja
va:286)
at
org.apache.jackrabbit.core.PropertyImpl.setValue(PropertyImpl.java:608)
at
org.apache.jackrabbit.core.NodeImpl.setProperty(NodeImpl.java:2285)
at
org.apache.jackrabbit.rmi.server.ServerNode.setProperty(ServerNode.java:
246)
at sun.reflect.GeneratedMethodAccessor728.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
this is the code I use to write the file data:
if (fileStream != null && fileContentNode != null) {
Node fileContentNode =
newNode.getNode("jcr:file").getNode("jcr:content");
fileContentNode.setProperty("jcr:data", fileStream);
}
I don't understand this because for small files it works "most" of the
time but as soon as I use a bigger file it definitely throws an
exception on the update.
So whatever file I upload it always works on the initial upload but then
when I want to replace the file the exception is thrown.
Can anyone point to where I could have done something worng?
I am using Jackrabbit-api 1.4 and Jackrabbit-core-1.4.5
Thx a lot in advance for any hints you guys might have!