You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Peter Mondlock <pe...@gmail.com> on 2008/10/08 17:19:22 UTC

Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Hi everyone,

I just finished integrating Jackrabbit 1.4 into our webapp system,
using MSSQL Server as the PersistenceDB. The company wants to move to
a different database setup. I'm testing the new deployment and I'm
encountering quite a snag.

I figured moving data from the old DB to the new one would be as
simple as copying the tables/data across and Jackrabbit would "find"
the data and reindex it. It connects fine and seems to be ok until it
throws a NoSuchItemStateException.

The errors at the top of the stack trace contain two "failed to read
bundle: 11de7c7b-5cb0-4c8a-9805-29c0a09bc118:
java.lang.IllegalStateException: URIIndex not valid?
javax.jcr.NamespaceException: URI for index 11 not registered." Then
it tells me that the root node has a missing child.

So I turned on consistency check/fix and they produce a bunch of:
"Error in bundle" with the same "URI for index 11 not registered"
message as above. I'm guessing one for every bundle in the table, from
the looks of it. It doesn't seem to want to fix the consistency
errors, to my dismay.

So it appears that just migrating the data isn't the way to do this
and I've been googling for 2 days trying to figure out what I should
be doing to make this work to no avail. Any and all advice is greatly
appreciated.

Thank you,

Peter

Re: Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Posted by Thomas Müller <th...@day.com>.
Hi,

> I've actually tried copying over the files and wiping only the indices

It is very likely that exception "URIIndex not valid?" also caused
some side effects (updates in the database).

What I would do is:
- Go back to a version where everything worked (using the old data).
- Verify you can start the repository, and the data is there.
- Keep the files in repository/*, but migrate the data to the new database only.
- Update the database URL in the repository.xml and workspace.xml files.
- Start the repository.

Regards,
Thomas

Re: Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Posted by Peter Mondlock <pe...@gmail.com>.
Thanks for the info, but it's the same DB vendor (MSSQL2005 to
MSSQL2005), I'm pretty sure it's reading them as well, because when
it's telling me that the bundles are inconsistent, it is referencing
the NODE_IDs of all the rows of the BUNDLE table.

On Wed, Oct 8, 2008 at 11:13 AM, Jukka Zitting <ju...@gmail.com> wrote:
> Hi,
>
> On Wed, Oct 8, 2008 at 6:00 PM, Peter Mondlock <pe...@gmail.com> wrote:
>> I've actually tried copying over the files and wiping only the indices
>> before, but all it does is keep it from erroring. It won't display any
>> of the data in the repository. Perhaps I'm doing something else
>> incorrectly?
>
> Note that different database persistence managers use different
> mechanisms of normalizing the table names (depending on the allowed
> characters, etc.).
>
> So if you just copy the tables to a different database (i.e. different
> vendor), you may want to check if starting the repository generates a
> new set of tables with slightly different names in the new database.
>
> BR,
>
> Jukka Zitting
>

Re: Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Wed, Oct 8, 2008 at 6:00 PM, Peter Mondlock <pe...@gmail.com> wrote:
> I've actually tried copying over the files and wiping only the indices
> before, but all it does is keep it from erroring. It won't display any
> of the data in the repository. Perhaps I'm doing something else
> incorrectly?

Note that different database persistence managers use different
mechanisms of normalizing the table names (depending on the allowed
characters, etc.).

So if you just copy the tables to a different database (i.e. different
vendor), you may want to check if starting the repository generates a
new set of tables with slightly different names in the new database.

BR,

Jukka Zitting

Re: Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Posted by Peter Mondlock <pe...@gmail.com>.
Thanks, Thomas.

I've actually tried copying over the files and wiping only the indices
before, but all it does is keep it from erroring. It won't display any
of the data in the repository. Perhaps I'm doing something else
incorrectly?

On Wed, Oct 8, 2008 at 10:31 AM, Thomas Müller <th...@day.com> wrote:
> Hi,
>
> You will also need to copy some files, specially:
> repository/namespaces/*
> repository/nodetypes/*
>
> Regards,
> Thomas
>
>
> On Wed, Oct 8, 2008 at 5:19 PM, Peter Mondlock <pe...@gmail.com> wrote:
>> Hi everyone,
>>
>> I just finished integrating Jackrabbit 1.4 into our webapp system,
>> using MSSQL Server as the PersistenceDB. The company wants to move to
>> a different database setup. I'm testing the new deployment and I'm
>> encountering quite a snag.
>>
>> I figured moving data from the old DB to the new one would be as
>> simple as copying the tables/data across and Jackrabbit would "find"
>> the data and reindex it. It connects fine and seems to be ok until it
>> throws a NoSuchItemStateException.
>>
>> The errors at the top of the stack trace contain two "failed to read
>> bundle: 11de7c7b-5cb0-4c8a-9805-29c0a09bc118:
>> java.lang.IllegalStateException: URIIndex not valid?
>> javax.jcr.NamespaceException: URI for index 11 not registered." Then
>> it tells me that the root node has a missing child.
>>
>> So I turned on consistency check/fix and they produce a bunch of:
>> "Error in bundle" with the same "URI for index 11 not registered"
>> message as above. I'm guessing one for every bundle in the table, from
>> the looks of it. It doesn't seem to want to fix the consistency
>> errors, to my dismay.
>>
>> So it appears that just migrating the data isn't the way to do this
>> and I've been googling for 2 days trying to figure out what I should
>> be doing to make this work to no avail. Any and all advice is greatly
>> appreciated.
>>
>> Thank you,
>>
>> Peter
>>
>

Re: Moving jackrabbit tables from one DB to another causes NoSuchItemStateException

Posted by Thomas Müller <th...@day.com>.
Hi,

You will also need to copy some files, specially:
repository/namespaces/*
repository/nodetypes/*

Regards,
Thomas


On Wed, Oct 8, 2008 at 5:19 PM, Peter Mondlock <pe...@gmail.com> wrote:
> Hi everyone,
>
> I just finished integrating Jackrabbit 1.4 into our webapp system,
> using MSSQL Server as the PersistenceDB. The company wants to move to
> a different database setup. I'm testing the new deployment and I'm
> encountering quite a snag.
>
> I figured moving data from the old DB to the new one would be as
> simple as copying the tables/data across and Jackrabbit would "find"
> the data and reindex it. It connects fine and seems to be ok until it
> throws a NoSuchItemStateException.
>
> The errors at the top of the stack trace contain two "failed to read
> bundle: 11de7c7b-5cb0-4c8a-9805-29c0a09bc118:
> java.lang.IllegalStateException: URIIndex not valid?
> javax.jcr.NamespaceException: URI for index 11 not registered." Then
> it tells me that the root node has a missing child.
>
> So I turned on consistency check/fix and they produce a bunch of:
> "Error in bundle" with the same "URI for index 11 not registered"
> message as above. I'm guessing one for every bundle in the table, from
> the looks of it. It doesn't seem to want to fix the consistency
> errors, to my dismay.
>
> So it appears that just migrating the data isn't the way to do this
> and I've been googling for 2 days trying to figure out what I should
> be doing to make this work to no avail. Any and all advice is greatly
> appreciated.
>
> Thank you,
>
> Peter
>