jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Müller" <thomas.muel...@day.com>
Subject Re: Nullpointer Exception updating a filedata
Date Fri, 29 Aug 2008 16:36:34 GMT
Hi,

Are you sure you are using Jackrabbit-core-1.4.5? From the stack trace
it looks like you are using Jackrabbit-core-1.4.0. Maybe an old jar
file is in your class path?

The bug you described was fixed in JCR-1346 which is included in 1.4.5.

Regards,
Thomas

On Fri, Aug 29, 2008 at 2:31 AM, Kurz Wolfgang <wolfgang.kurz@gwvs.de> wrote:
> 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!
>

Mime
View raw message