

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
9 messages in org.apache.jackrabbit.usersRE: Exception while indexing| From | Sent On | Attachments |
|---|---|---|
| Kaizer | Sep 26, 2007 3:15 am | |
| Kaizer | Oct 1, 2007 12:04 am | |
| Marcel Reutegger | Oct 1, 2007 1:46 am | |
| Kaizer | Oct 1, 2007 3:24 am | |
| Christophe Lombart | Oct 1, 2007 3:28 am | |
| Kaizer | Oct 1, 2007 3:39 am | |
| Kaizer | Oct 2, 2007 10:50 pm | |
| Kaizer | Oct 15, 2007 11:13 pm | |
| Vikram Shitole | Oct 16, 2007 8:11 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: Exception while indexing | Actions... |
|---|---|---|
| From: | Vikram Shitole (vikr...@mastek.com) | |
| Date: | Oct 16, 2007 8:11:13 am | |
| List: | org.apache.jackrabbit.users | |
Hi,
This error occurs in the following scenarios.
If you insert a object into the JackRabbit repository with the
org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager
persistence manager into the repository.
The bundle persistence manager creates temporary indexes in the repository
homedir.
If I try to run the OCM program to get a particular object from the repository
on a different machine where the temporary indexes doesn't exists it throws this
error
Caused by: java.io.IOException: Error indexing root node: 7107e03e-aefb-4663-9cf5-1663e665bb5f
This particularly happens because of the OCM namespace doesn't gets register
while creating the temporary indexes for the first time and it tries to create
the indexes as the objects are already present into the repository.
Thanks & Regards Vikram Shitole "We are what we repeatedly do. Excellence, therefore,is not an act but a habit."
-----Original Message----- From: Kaizer Shaikh Sent: Tuesday, October 16, 2007 11:44 AM To: use...@jackrabbit.apache.org Subject: Re: Exception while indexing
I added the below fix to RepositoryImpl.java and it works fine. I'm not sure if its the right fix though.
I copied the method setupSession() from RepositoryUtil and added it in RepositoryImpl.java. I call this method from the constructor after the call to createNamespaceRegistry. What this does is it registers the namespace for OCM upfront. Now if I already have data stored in a DB and I'm initializing the repository for the first time, it works smoothly during indexing as the namespaces for OCM have already been registered.
Please let me know your views on this. Thanks.
public static void setupSession(NamespaceRegistry nsReg) throws RepositoryException { try { /** namespace prefix constant */ final String OCM_NAMESPACE_PREFIX = "ocm";
/** namespace constant */ final String OCM_NAMESPACE = "http://jackrabbit.apache.org/ocm";
log.info("Setup Jcr session setup ...");
String[] jcrNamespaces = nsReg.getPrefixes(); boolean createNamespace = true; for (int i = 0; i < jcrNamespaces.length; i++) { if (jcrNamespaces[i].equals(OCM_NAMESPACE_PREFIX)) { createNamespace = false; log.debug("Jackrabbit OCM namespace exists."); } }
if (createNamespace) { nsReg.registerNamespace(OCM_NAMESPACE_PREFIX, OCM_NAMESPACE); log.info("Successfully created Jackrabbit OCM namespace."); }
} catch (Exception e) { log.error("Error while setting up the jcr session.", e); throw new RepositoryException(e.getMessage()); } }
Christophe Lombart wrote:
The ancertor class used for the OCM unit tests should help. You will see how to init the ObjectContentManager correctly and in the correct order.
humm it time to make some docs :-(
Christophe
On 10/1/07, Kaizer <Kaiz...@mastek.com> wrote:
But if I'm initializing the repository for the first time and trying to access objects that have already been persisted in the database, it fails because the OCM namespace entries havent been added yet. How do i specify the entries in this case? The RepositoryUtil class adds the entries for OCM but it hasnt been called yet.
Marcel Reutegger wrote:
Hi,
I'm not sure I understand the issue, but to me it looks like you forgot to copy the registered namespaces to the new location.
regards marcel
Kaizer wrote:
Hi,
I did some debugging on this and found that this issue arises because the namespace for OCM hasn't been registered yet. Its only after the Session is created that the RepositoryUtil class registers them. I think this problem doesn't occur with the org.apache.jackrabbit.core.persistence.db.OraclePersistenceManager as it doesnt create name index. I think the solution would be to register the OCM namespace as part of the NameSpaceRegistryImpl class itself. Please let me know what can be done regarding this.
Thanks.
Regards Kaizer
Kaizer wrote:
Hi,
My persistence manager is
org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager .
If there is some existing data in the DB and i try to initialize the repository for the first time, i get this exception. If i deleted everything and then try, it works fine. What could be going wrong?
Caused by: java.io.IOException: Error indexing root node: 7107e03e-aefb-4663-9cf5-1663e665bb5f at org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>( MultiIndex.java:323) at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit( SearchIndex.java:295) at org.apache.jackrabbit.core.query.AbstractQueryHandler.init( AbstractQueryHandler.java:44) at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler( SearchManager.java:474) ... 19 more java.io.IOException: Error indexing root node: 7107e03e-aefb-4663-9cf5-1663e665bb5f at org.apache.jackrabbit.core.query.lucene.MultiIndex.<init>( MultiIndex.java:323) at org.apache.jackrabbit.core.query.lucene.SearchIndex.doInit( SearchIndex.java:295) at org.apache.jackrabbit.core.query.AbstractQueryHandler.init( AbstractQueryHandler.java:44) at org.apache.jackrabbit.core.SearchManager.initializeQueryHandler( SearchManager.java:474) at org.apache.jackrabbit.core.SearchManager.<init>(SearchManager.java :231) at
org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getSearchManager( RepositoryImpl.java:1580)
at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace( RepositoryImpl.java:570) at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces( RepositoryImpl.java:379) at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java :286) at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java :521) at org.apache.jackrabbit.core.TransientRepository$1.getRepository( TransientRepository.java:186) at org.apache.jackrabbit.core.TransientRepository.startRepository( TransientRepository.java:265) at org.apache.jackrabbit.core.TransientRepository.login( TransientRepository.java:333) at org.apache.jackrabbit.core.TransientRepository.login( TransientRepository.java:363)
-- View this message in context: http://www.nabble.com/Exception-while-indexing-tf4521289.html#a12976673 Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
--
View this message in context:
http://www.nabble.com/Exception-while-indexing-tf4521289.html#a13227395
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
MASTEK LTD. Making a valuable difference Mastek in NASSCOM's 'India Top 20' Software Service Exporters List. In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of
Mastek Limited, unless specifically indicated to that effect. Mastek Limited
does not accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the
recipient to run the virus check on e-mails and attachments before opening them.
If you have received this e-mail in error, kindly delete this e-mail from
desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~







