You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Paul PODGORSEK <th...@hotmail.com> on 2009/05/19 17:29:56 UTC

Premature end of file custom_nodetypes.xml

Hello,

I have had quite a big problem a few days ago, and I would like some advice about it.

After having restarted my application, which of course uses JackRabbit (version 1.5), I got the following error:
          javax.jcr.RepositoryException: internal error: failed to read custom
node type definitions stored in custom_nodetypes.xml: Premature end of file.: Premature end of file.

At first, I thought it was a problem with the local indexes. I decided to stop the application, delete the indexes, and let JackRabbit build them again during the restart of the app, but I got exactly the same error during the restart (no index was generated).

I started to have a deeper look into JackRabbit's database and I discovered something strange in the J_R_FS_FSENTRY table ("J_R_FS_" is the prefix given to the schemaObjectPrefix in the FileSystem definition for the Repository), in the following entry:
          FSENTRY_PATH=/nodetypes
          FSENTRY_NAME=custom_nodetypes.xml
          FSENTRY_DATA=
          FSENTRY_LENGTH=0

The data had been erased. I didn't change the node types I already declared in the app (this had been working for several months).
As this field only changes when the node types are updated, I tried fetching this entry from another environment.
I copied the data and the length, and tried once again to restart.
This time, everything went fine. The indexes were generated and the app started correctly.

My question is: is there a proper way to solve this problem?
Has anybody already had this issue?
Do you know what caused this and how I could avoid having this problem again?

I found a JIRA ticket (https://issues.apache.org/jira/browse/JCR-609), but there are no replies to it.

Thank you very much.

Regards,
Paul.

_________________________________________________________________
Découvrez toutes les possibilités de communication avec vos proches
http://www.microsoft.com/windows/windowslive/default.aspx