You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Raj <db...@gmail.com> on 2012/08/27 18:26:00 UTC

Corrupted blob data in JackRabbit 2.2.4 on MySQL using bundle PM

Hi All,

We are facing a critical issue in our JackRabbit setup.
My JackRabbit 2.2.4 instance using MySQL has partially corrupted data. Am
using bundle PM.

Debugging through the code -

1. SELECT BINVAL_DATA FROM JACKRABBIT_THED_BINVAL WHERE BINVAL_ID =
'd5010f4f-2ed2-47ca-864c-6d7b214896fc.1570322.1.0';
No records found.
Data is missing for blob in this table
2. the error is thrown when code attempts to fetch child nodes.
NodeIterator ni = node.getNodes();
3. Code attempts to prefetch first child (which contains blob). exception
is thrown during prefetch. but exception is internally gobbled
2012-08-27 20:04:08,844 ERROR [main] LazyItemIterator.prefetchNext(153) |
failed to fetch item 91637020-6c38-4551-b043-3db7fbb6429e, skipping...
4. this is due to bad bundle
Caused by: org.apache.jackrabbit.core.state.ItemStateException: failed to
read bundle: 91637020-6c38-4551-b043-3db7fbb6429e: java.sql.SQLException:
Failed to parse bundle 91637020-6c38-4551-b043-3db7fbb6429e

5. as it is unable to read child bundle: intermediate exception:
Caused by: java.sql.SQLException: Failed to parse bundle
91637020-6c38-4551-b043-3db7fbb6429e
6. Caused by: java.io.IOException: Unable to create property value:
java.lang.Exception: no such BLOB:
91637020-6c38-4551-b043-3db7fbb6429e.1570322.1.0
root cause is missing blob in table. (mentioned in #1)

7. If I insert a blank blob data, it doesn't throw exception and can
retrieve the values.
INSERT INTO JACKRABBIT_THED_BINVAL VALUES
('d5010f4f-2ed2-47ca-864c-6d7b214896fc.1570322.1.0','');

Question: what is the right approach to do in this situation ?
Why did this happen at the first place? We do have transactionality in our
JackRabbit methods.

Even consistency check fails. I also tried ignore-blob-error setting, there
is no difference in behavior.
<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
  <param name="errorHandling" value="IGN_MISSING_BLOBS"/>

Any pointers will be helpful.

regards,
Rajeev