jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jaka Jaksic (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-551) Null values cause BLOB corruption
Date Thu, 31 Aug 2006 06:32:22 GMT
Null values cause BLOB corruption
---------------------------------

                 Key: JCR-551
                 URL: http://issues.apache.org/jira/browse/JCR-551
             Project: Jackrabbit
          Issue Type: Bug
          Components: core
    Affects Versions: 1.0.1
            Reporter: Jaka Jaksic
            Priority: Critical


Using the file persistence manager (not sure about other managers) there is a way to produce
a corrupt property BLOB, which can then be neither read nor modified nor deleted. Once this
happens, Jackrabbit starts throwing "failed to read property state" exceptions every time
it hits that property, and essentially becomes useless until the BLOB is fixed (e.g. with
a hex editor).

The problem is caused by passing a null value to a setProperty overload other than setProperty(String,
Value).
For example:

    node.setProperty("corruptionTest", null, PropertyType.STRING);

This produces a corrupt BLOB (the data in the BLOB indicates value count = 1, then the BLOB
ends) instead of removing the property or at least throwing an exception.

setProperty(String, Value) properly removes the property if a null is passed to it, as documented
in the JCR spec. I think other overloads should do the same, although this is not explicitly
stated in the spec. In any case they should not corrupt repository data.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message