You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Savas Triantafillou <sa...@gmail.com> on 2007/03/12 18:55:20 UTC

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Hi,

I would like to describe a similar situation and would really need your
opinion on this

During some development I have once again deleted repository home directory
without migrating from 1.1 to 1.2.x

Once repository started again and index was rebuilt without any problems,

the same problem with the results of the queries appeared, that is query
results did not take into account nodes which
were created before rebuilding repository home directory.

If a new node was added to the repository, it showed in the queries results

I have checked JCR browser and all of previous nodes exists, so I have tried
the following

I have used method getNodeByUUID to get an "old" versionable node, checked
it out and then checked it in and saved the session.

Then I rerun the query it showed up in the results!!!

Does anybody have a hint of why this might be happening?

Savvas,

On 2/12/07, Marcel Reutegger <ma...@gmx.net> wrote:
>
> Savas Triantafillou wrote:
> > I have stopped jackrabbit, replaced all necessary jars , deleted
> repository
> > home directory  not only the index dirs and started jackrabbit
>
> I just tried exactly the same and queries worked fine with content I
> added.
>
> > This way queries did not work at all
>
> this is very strange, because that's basically the starting point for an
> empty
> repository. our query regression tests initially also have an empty
> repository,
> but none of them failed for the 1.2.1 release.
>
> > whereas if I delete only the index
> > files as you mention in http://issues.apache.org/jira/browse/JCR-669 ,
> > everything works OK
>
> regards
>   marcel
>

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Posted by Marcel Reutegger <ma...@gmx.net>.
Savas Triantafillou wrote:
> What I did was to delete  the whole repository home directory that is both
> the 'repository' and 'workpaces'
> directories

This means you deleted *all* content in your repository. In that case there's 
nothing you can query for, unless you add content again.

regards
  marcel

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Posted by Savas Triantafillou <sa...@gmail.com>.
On 3/14/07, Marcel Reutegger <ma...@gmx.net> wrote:
>
> Hi Savas,
>
> Savas Triantafillou wrote:
> > the whole directory... not only indeces...
>
> if you were more specific this would be a lot easier :-/
>
> I asked about the exact directories you deleted. but anyway...
>
> if you delete the whole 'repository home' directory, all data is removed
> and you
> will start with an empty repository and just the default workspace.
>
> but it seems that's not the case. therefore I assume what you really
> deleted was
> the 'repository' directory (contains folders: index, meta, namespaces,
> nodetypes) in your 'repository home' directory.



What I did was to delete  the whole repository home directory that is both
the 'repository' and 'workpaces'
directories

> the funny thing is that there was no error no warning message...
> >
> > To be more specific the only change that I have made was that I have
> > removed
> > from cnd file
> > some namespace declarations that were no longer in use in the custom
> node
> > types.
> >
> > I have tried to remove these namespaces using JCR API but an exception
> was
> > thrown saying that
> > "unregistering namespaces is not supported"
> >
> > that is why I have deleted namepsaces frmo cnd, deleted all files under
> > repository directoy
> > and started Repository in order to get the changes
>
> please note that what you did is quite dangerous because you deleted parts
> of
> the repository internal data and assumed that jackrabbit will be fine
> re-creating it. however this only applies to the index directories.
> everything
> else *must not* be touched or if you do at your own risk.


I understand this and believe me it is the last time I did this !!!

getting back to your problem. because you deleted the repository directory
> and
> at the same time upgraded to 1.2.1, the re-created index for the
> jcr:system tree
> used another mechanism for namespace resolution than before. See:
> http://issues.apache.org/jira/browse/JCR-669
> The change is backward compatible but fails to work properly if you only
> re-index the jcr:system index.
>
> what you have to do is, delete the directory repository/index and also all
> workspaces/*/index directories. then the queries will work properly even
> after
> the migration.




However, how do you explain the fact that despite all of the above if I do a
resave of all the nodes in the repository
queries seem to be working fine ?


and again just to avoid confusion: if one migrates from 1.x to 1.2.x there
> is no
> need to re-index the content! but if you do wish to re-index the content
> (for
> whatever reason) you have to re-index the whole repository.
>
> regards
>   marcel


Thank you very much for your help

Savvas

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Savas,

Savas Triantafillou wrote:
> the whole directory... not only indeces...

if you were more specific this would be a lot easier :-/

I asked about the exact directories you deleted. but anyway...

if you delete the whole 'repository home' directory, all data is removed and you 
will start with an empty repository and just the default workspace.

but it seems that's not the case. therefore I assume what you really deleted was 
the 'repository' directory (contains folders: index, meta, namespaces, 
nodetypes) in your 'repository home' directory.

> the funny thing is that there was no error no warning message...
> 
> To be more specific the only change that I have made was that I have 
> removed
> from cnd file
> some namespace declarations that were no longer in use in the custom node
> types.
> 
> I have tried to remove these namespaces using JCR API but an exception was
> thrown saying that
> "unregistering namespaces is not supported"
> 
> that is why I have deleted namepsaces frmo cnd, deleted all files under
> repository directoy
> and started Repository in order to get the changes

please note that what you did is quite dangerous because you deleted parts of 
the repository internal data and assumed that jackrabbit will be fine 
re-creating it. however this only applies to the index directories. everything 
else *must not* be touched or if you do at your own risk.

getting back to your problem. because you deleted the repository directory and 
at the same time upgraded to 1.2.1, the re-created index for the jcr:system tree 
used another mechanism for namespace resolution than before. See: 
http://issues.apache.org/jira/browse/JCR-669
The change is backward compatible but fails to work properly if you only 
re-index the jcr:system index.

what you have to do is, delete the directory repository/index and also all 
workspaces/*/index directories. then the queries will work properly even after 
the migration.

and again just to avoid confusion: if one migrates from 1.x to 1.2.x there is no 
need to re-index the content! but if you do wish to re-index the content (for 
whatever reason) you have to re-index the whole repository.

regards
  marcel

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Posted by Savas Triantafillou <sa...@gmail.com>.
HI,

the whole directory... not only indeces...

the funny thing is that there was no error no warning message...

To be more specific the only change that I have made was that I have removed
from cnd file
some namespace declarations that were no longer in use in the custom node
types.

I have tried to remove these namespaces using JCR API but an exception was
thrown saying that
"unregistering namespaces is not supported"

that is why I have deleted namepsaces frmo cnd, deleted all files under
repository directoy
and started Repository in order to get the changes

After that all queries concerning custom nodes behave like repository is
empty
although I can see repository content through JCR eclipse browser

Savvas

On 3/13/07, Marcel Reutegger < marcel.reutegger@gmx.net> wrote:
>
> Savas Triantafillou wrote:
> > Hi,
> >
> > I would like to describe a similar situation and would really need your
> > opinion on this
> >
> > During some development I have once again deleted repository home
> directory
> > without migrating from 1.1 to 1.2.x
> >
> > Once repository started again and index was rebuilt without any
> problems,
> >
> > the same problem with the results of the queries appeared, that is query
> > results did not take into account nodes which
> > were created before rebuilding repository home directory.
> >
> > If a new node was added to the repository, it showed in the queries
> results
> >
> > I have checked JCR browser and all of previous nodes exists, so I have
> > tried
> > the following
> >
> > I have used method getNodeByUUID to get an "old" versionable node,
> checked
> > it out and then checked it in and saved the session.
> >
> > Then I rerun the query it showed up in the results!!!
> >
> > Does anybody have a hint of why this might be happening?
>
> from your description I'd say something went wrong when you re-indexed the
> workspaces.
>
> you say you deleted the repository home directory, this even deletes the
> workspace content, not just the index. or was that a typo in your message?
>
> what are the exact directories you deleted?
>
> regards
>   marcel
>

Re: Strange behavior on upgrade from 1.1.1 to 1.2.1

Posted by Marcel Reutegger <ma...@gmx.net>.
Savas Triantafillou wrote:
> Hi,
> 
> I would like to describe a similar situation and would really need your
> opinion on this
> 
> During some development I have once again deleted repository home directory
> without migrating from 1.1 to 1.2.x
> 
> Once repository started again and index was rebuilt without any problems,
> 
> the same problem with the results of the queries appeared, that is query
> results did not take into account nodes which
> were created before rebuilding repository home directory.
> 
> If a new node was added to the repository, it showed in the queries results
> 
> I have checked JCR browser and all of previous nodes exists, so I have 
> tried
> the following
> 
> I have used method getNodeByUUID to get an "old" versionable node, checked
> it out and then checked it in and saved the session.
> 
> Then I rerun the query it showed up in the results!!!
> 
> Does anybody have a hint of why this might be happening?

from your description I'd say something went wrong when you re-indexed the 
workspaces.

you say you deleted the repository home directory, this even deletes the 
workspace content, not just the index. or was that a typo in your message?

what are the exact directories you deleted?

regards
  marcel