Robert Haycock | 24 Apr 16:05 2014

Overriding SearchIndex.updateNodes - removing


Jackrabbit 2.6.4

I've overridden SearchManager.updateNodes(Iterator<NodeId> remove, Iterator<NodeState> add) to
create my own index. This index should reflect the current state so when a node is deleted it should be removed.

I can see when I delete a node that the NodeId does'nt exist in remove but there is an unstructured NodeState
in add.

Could someone please tell me how I can remove documents from my own index.

Peter Harrison | 23 Apr 05:56 2014

Is ORM a Dead Project?

A number of months ago I attempted to contribute some code that provided 
a way to map a List to the properties of a single Node to the ORM 
project. This only works for arrays of primitives of course, but was 
quite useful to me, and others I noted were asking for similar 

I have tried to follow the process of issue tracker submission and 
attaching my code but I note that the OCM project has had no commits 
whatsoever since... well as long as I have been watching since at least 
September last year.

I'm using Jackrabbit in anger (aka - not just playing, we are doing 
serious projects) but I am concerned that the code base of OCM has been 
abandoned. This doesn't bode well for the rest of the codebase. I'm 
happy to contribute and help, but there has been no replies to my 
queries about progress on commiting my contributions.

Perhaps my code is junk or I'm taking the wrong approach, or there is a 
better way, but I'm not really getting the impression I'm welcome. I 
realise people are busy, but this is wasting the opportunity to involve 
experienced developers who are keen to help. I'm not beating up on 
anyone - I just would like to get more involved in this great project.


Stuart Wilson | 22 Apr 07:39 2014

The Jackrabbit JCA

I have tried to set up Jackrabbit Resource Adapter and seem to have reached
a dead-end. I have a post here
usion>  describing (some of) my attempts. I wonder if the resource adapter
works at all, or ever did. It seems as if the documentation has been broken,
albeit in a strange way, with respect  to this, on purpose. Why I do not
know, but I do believe that ir would be difficult to garf up their
documentation, in this specific area, by accident. There is evidence of a
move to use JAAS for the resource adapter, though as nearly everyone who
comments on Jackrabbit says, documentation is hard to come by.

I had hoped to use the JCR for a tag based document store, running in the
same JVM as my application server. At this point however, I am about to
abandon it. I don't know if it is just the JCA, or the entire project, that
ultimately amounts to so little. The project seems to be working on new
things. If I could, I would ask them, "Why?". No one, at least certainly not
I, will be interested in using their stuff when the condition of the
projects in their wake is so deplorable. I am to that point that I don't
really care what reasons there are, and am about to move on to a different

I wish that I had an email address for someone who was somebody at Apache. I
would ask them why they have such broken cr*p for a project. And why they
continue to publish it with every revision of the documentation since
version 2.0 full of broken links and missing inserts.

Day's concept is/was brilliant. I wish that I could say the same for

(Continue reading)

Karan Malhi | 20 Apr 19:30 2014

Migrating from derby to h2 using jackrabbit standalone jar causing exception in h2

I am trying to migrate an existing repository from
org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager to
org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager and it
worked like a charm.

Now I am trying to migrate the same repository to
org.apache.jackrabbit.core.persistence.pool.H2PersistenceManager and am
getting a unique/primary key violation in h2 (see below). Appreciate any
help getting around this issue.

$ java -Xmx1024m -jar jackrabbit-standalone-2.8-SNAPSHOT.jar --backup
--repo target-data --conf new-repository.xml --backup-repo ./target-data-h2
--backup-conf new-repository-h2.xml
Welcome to Apache Jackrabbit!
Using repository directory target-data
Writing log messages to target-data/log
Creating a repository copy in ./target-data-h2
Exception in thread "main" javax.jcr.RepositoryException: failed to
instantiate shared item state manager
(Continue reading)


Unable to access repository using WebDAV from java.


I've deployed jackrabbit-webapp-2.6.5.war in tomcat and I'm able to access
http://localhost:8082/jackrabbit-webapp-2.6.5/server from browser.

But when I try to access repository from java test code
public class Test {

        <at> SuppressWarnings("nls")
       public static void main(String[] args) {

             Repository repository;
             Session session = null;
             try {
                    repository = JcrUtils

                    session = repository.login(new SimpleCredentials("admin", "admin"

                    Node node = session.getRootNode();

                    System.out.println("name" + node.getName() + " path "
                                 + node.getPath());

             } catch (Exception e) {
                    // TODO Auto-generated catch block
             } finally {
                    if (session != null) {
(Continue reading)

Torgeir Veimo | 14 Apr 12:34 2014

remote user management over webdav

Are there any best practices regarding creating users on a remote
jackrabbit repository?



isidoro | 11 Apr 18:03 2014

Indexing a property in a sub node

I'm trying to index a property in a subnode:
How can I index the property myjrc:size of the node jcr:content in a node of
type myjcr:myType? 
I've tried doing this in my indexing_configuration.xml:

 <aggregate primaryType="myjcr:myType">

And then I've created a xpath to search files by size:

jcr:content/ <at> myjrc:size > xs:long('0')

but it does not work. 

What's wrong? Can anyone help me?

Thanks in advance.


View this message in context:
Sent from the Jackrabbit - Users mailing list archive at

Dube, Shreyas | 10 Apr 16:02 2014

Persisting SearchIndex to database


Background: I’m evaluating JCR/Jackrabbit as a layer of abstraction for persistence over Oracle. We
are using Tomcat6 as the application server. We usually have 4 – 8 Tomcat’s clustered up in the
production environment. I have configured all <FileSystem> and <PersistenceManager> stanzas to point
to Oracle (well, I’m using MySQL now, but that’ll change). I have NOT set up clustering in Jackrabbit
yet and that is something I want to look at once I figure <SearchIndex> out. This is my <SearchIndex>
configuration for a <Workspace>

        <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="extractorPoolSize" value="2"/>
            <param name="supportHighlighting" value="true"/>

This <SearchIndex> configuration ends up creating a bunch of files under ${wsp.home}/index under the
repository home and the workspace home directory.

 1.  What are these files storing? I’m assuming it is the search index.
 2.  Given that we have a clustered Tomcat setup, would it be possible to persist the search index to the database?
 3.  If 2 is not possible, are there other search providers that would work in a clustered environment?
 4.  Would turning on Jackrabbit clustering sync search indexes across all nodes? When are search indexes
updated in a clustered environment?

Jakob Reichl | 9 Apr 13:36 2014

Assign a name to a branch of the version tree

What is the best way to assign names to branches of the version tree of a node ?
A node may have a main branch, one or several development branches and
 an integration branch.
One solution is to use labels, another one is to use a property. Are
there better alternatives ?

An application may be e.g. "give me the latest version on a certain branch".

Lukas Kahwe Smith | 8 Apr 09:25 2014

json API exception


While using the json API we are seeing frequently such errors. These are read requests, which is why I am a bit
confused about the “WRITER” in the stack trace but I guess the issue is that
"/server/joiz_ch/jcr:root/.0.json” is an invalid URL?

2014-04-03 12:28:06.964 ERROR [2115513477 <at> qtp-221739023-131] /server/joiz_ch/jcr:root/.0.json
java.lang.IllegalStateException: WRITER
	at org.mortbay.jetty.Response.getOutputStream( ~[jackrabbit.jar:na]
org.apache.jackrabbit.webdav.WebdavResponseImpl.sendXmlResponse( ~[jackrabbit.jar:na]
	at org.apache.jackrabbit.webdav.WebdavResponseImpl.sendError( ~[jackrabbit.jar:na]
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service( ~[jackrabbit.jar:na]
	at javax.servlet.http.HttpServlet.service( ~[jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.ServletHolder.handle( ~[jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.ServletHandler.handle( ~[jackrabbit.jar:na]
	at [jackrabbit.jar:na]
	at org.mortbay.jetty.servlet.SessionHandler.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.ContextHandler.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.webapp.WebAppContext.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.HandlerWrapper.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.RequestLogHandler.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.handler.HandlerWrapper.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.Server.handle( [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection.handleRequest( [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection$RequestHandler.content( [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpParser.parseNext( [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpParser.parseAvailable( [jackrabbit.jar:na]
	at org.mortbay.jetty.HttpConnection.handle( [jackrabbit.jar:na]
(Continue reading)

crm6360 | 27 Mar 21:00 2014

ImportXML fatal bug with jackrabbit webapp 2.6+

Has anyone else been able to confirm this because I'm seeing other developers
reporting similar issues and don't know if the apache team is in fact aware.  
To reproduce simply deploy a jackrabbit-webapp-2.6.2 or greater (haven't
tested on earlier versions).

Attempt to import previously serialized XML using the sesson.importXML or
workspace.importXML( ... ).

When your session or workspace points to the jackrabbit-standalone
configuration the import is successful and the node is generated on the
server.   When your session points to the webapp config, the process fails

DavLocatorFactoryImpl.getRepositoryPath() is returning the incorrect
workspace path.  In this example, the workspace is "default".   The trace:

SEVERE: Servlet.service() for servlet [JCRWebdavServer] in context with path
[/jackrabbit-webapp-2.7.5] threw exception
java.lang.IllegalArgumentException: Unexpected format of resource path:
(workspace: /jackrabbit-webapp-2.7.5)
(Continue reading)