jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek" <aklim...@day.com>
Subject Re: Nullpointer Exception updating a filedata
Date Mon, 08 Sep 2008 09:40:29 GMT
Maybe you have an older jackrabbit-core jar somewhere else in your
classpath. The stacktrace clearly indicates that the 1.4.5 code is not
used, since the line numbers would look differently:

org.apache.jackrabbit.core.value.BLOBInTempFile.discard(BLOBInTempFile.java:129)
       at
org.apache.jackrabbit.core.PropertyImpl.internalSetValue(PropertyImpl.java:286)

discard() is not called in line 286 of PropertyImpl in version 1.4.5:

http://svn.apache.org/viewvc/jackrabbit/tags/jackrabbit-core-1.4.5/src/main/java/org/apache/jackrabbit/core/PropertyImpl.java?annotate=661900


Regards,
Alex

On Mon, Sep 8, 2008 at 9:34 AM, Kurz Wolfgang <wolfgang.kurz@gwvs.de> wrote:
> Well i only have jackrabbit-core-1.4.5 in my lib folder. And still get the same error.
>
> Is there something on my part that I am doing wrong or is this a jackrabbit bug?
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: tmueller@day.com [mailto:tmueller@day.com] Im Auftrag von Thomas Müller
> Gesendet: Freitag, 29. August 2008 18:37
> An: users@jackrabbit.apache.org
> Betreff: Re: Nullpointer Exception updating a filedata
>
> 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!
>>
>



-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message