techie2k | 16 Sep 09:18 2014

Unable to impersonate - Jackrabbit

I have custom type node /et:document /which needs to shared among some users
in jackrabbit repository.

But when I try to impersonate as superuser and assign to each user, a
defined property /sharedWithMe/, getting *failed login exception*.

Log in as application user,

/SimpleCredentials credentials = new SimpleCredentials(userName,
Session session = repository.login(credentials, "default");/

Trying to share documents(with property added to user node)

/SimpleCredentials credentials = new SimpleCredentials("superuser",
Session adminUser = session.impersonate(credentials);
UserManager userManager = ((JackrabbitSession) adminUser).getUserManager();

for(String userID : users) {
    User user = (User) userManager.getAuthorizable(userID);
    Value value = vf.createValue(docPath);
    Value[] sharedDocsPath =  user.getProperty("sharedWithMe");
    int shareDocIndex = 0;
    Value[] revisedSharedDocPath = null;

    if (null != sharedDocsPath && sharedDocsPath.length > 0) {
        revisedSharedDocPath = new Value[sharedDocsPath.length + 1];

        for (Value v : sharedDocsPath) {
(Continue reading)

Tomasz Kleszczyński | 12 Sep 13:13 2014

Using two or more sessions within one XA Transaction


Does anybody have experience with using two sessions in one XA Transaction?
JCR specification describes using one session and multiple transactions. But
how about the opposite way? Is this case not supported or there may be bugs
in Jackrabbit in this area?

First tests have shown that such usage doesn't work as expected. State of
one session leaks to another one.
Here's attached my test case:

Best regards,

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

Thomas Auinger | 11 Sep 10:46 2014

Performance of DefaultISMLocking.releaseReadLock()


I am currently profiling a single-threaded Jackrabbit 2.8 application, which is reading 1800 nodes into
POJOs (we store entity data in JCR).

VisualVM sampling tells me, that 57% of all time is spend in method org.apache.jackrabbit.core.state.DefaultISMLocking.releaseReadLock()

Now while that method does not look very complicated, I was wondering if there are known tips how to speed up
locking (wiki page says its "TODO") or if anybody has helpful thoughts on this.

Thanks in advance

Tom Barber | 8 Sep 11:34 2014

Webdav server set mixin on new nodes

Hi guys

I've setup a repository and then got a requirement later to add webdav 
access. My repo contains a bunch of different file types some of which I 
apply mixins to to help me find files, set extra information etc.

So when someone creates a new node via webdav, if I can detect the file 
type using Tika or something can I then apply the mixin the a new node?



*Tom Barber* | Technical Director

meteorite bi
*T:* +44 20 8133 3730
*W:* | *Skype:*
*A:* Surrey Technology Centre, Surrey Research Park, Guildford, GU2 7YG, UK
ke8 | 7 Sep 15:18 2014

JCR performance

I need advice how to improve JCR(2.4.1) performance. My solution need to
store more than 10 000 000 xml documents. I have available more than 10 GB
of RAM. Repository is accessed over RMI. I found only instructions, that
it’s good to increase memory to persistence manager and not having to many
child on a single node (in my solution one node can have max. 4096 child). I
need to accelerate insert and update mainly. Could anyone please advise me
how can I adjust configuration to improve performance? Thank you very much
for your answers. Sorry for my English…

wokspace.xml :

<?xml version="1.0" encoding="UTF-8"?><Workspace name="default">

            <param name="path" value="${wsp.home}"/>

          <param name="url"
          <param name="schemaObjectPrefix" value="${}_"/>
		  <param name="externalBLOBs" value="true"/>
          <param name="consistencyCheck" value="false"/>
          <param name="consistencyFix" value="false"/>
          <param name="bundleCacheSize" value="4096" />  

(Continue reading)

uv | 3 Sep 11:45 2014

How to clean huge datastore?


our system uses jackrabbit 2.6.5 and MySQL DB datastore. Jackrabbit DB
schema size is 300GB, most of it is in datastore. When we run jackrabbit
garbage collector, it runs almost 3 days. Running GC has significant impact
on application performance.

Could you please advice what possibility we have?

Somehow spit GC to do not iterate through whole datastore? When GC is not
finished completely, we can not run datastore clean because we can not be
sure what has been scanned and what has not.

Or is there any other GC implementation?

Thank you very much.


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

techie2k | 3 Sep 08:56 2014

Creating empty string for 'rep:glob'

To restrict node access to user(using principalbased acl), tried with
following snippet, but turns ineffective.

/Map<String, Value> restrictions = new HashMap<String, Value>();
//Apply privilege to user to have read only access to root folder
restrictions.put("rep:nodePath", valueFactory.createValue(ROOT,
restrictions.put("rep:glob", valueFactory.createValue(""));
accessControlList.addEntry(userPrincipal, privileges, true  , restrictions);

Is there any other way to set 'rep:glob' property to ""?

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

Andrew Savory | 2 Sep 17:07 2014

[Event] User and developer meetup in Berlin


On 22-24 Sept there will be the adaptTo() event in Berlin. This event is
for users and developers of Apache Jackrabbit, as well as Sling, Felix,
Cordova, Solr, etc (and many other technologies that go into Adobe's AEM

You can find more information at and you can
register at

It's a great event with lots of opportunity for technical discussions, and
includes a mini hackathon on day 2.

Hope to see you there!


asavory <at> / contact <at>
Mathijs den Burger | 2 Sep 09:35 2014

Syncing a local directory using FileVault


I'm trying to use FileVault to automatically sync a local directory
from filesystem into a Hippo repository (which is based on
JackRabbit). The main reason for using FileVault is the automatic
handling of meta-data in the .content.xml files.

So far I've successfully used the Importer class to import an Archive
based on files or a zip file. I've also implemented a simple file
watcher that triggers a reimport whenever something changes. This
nicely imports changes and newly added files and directories. So far
so good.

The problem is that deleting files or directories does not delete
their counterparts in JCR. I'd expect that using ImportMode.REPLACE
would completely replace the JCR node structure and automatically
delete everything that is no longer present in the imported archive,
but that's not the case.

Reading through code it seems the vlt tool uses the meta-data in the
.vlt directory to track deleted files, which are then processed during
a commit. Is there a way to add such meta-data to an Archive or
educate the Importer somehow?

I've also read through the code of the vault-sync tool, which
basically implements my use case. I cannot use it as-is though, since
Hippo does not use OSGI. IIUC vault-sync does not use Archives or
Packages at all, but uses its own TreeSync class that does lots of
plain JCR calls. Does that mean that vault-sync does not process
meta-data files at all?
(Continue reading)

Thomas Mueller | 1 Sep 10:32 2014

[ANNOUNCE] Apache Jackrabbit Oak 1.0.5 released

The Apache Jackrabbit community is pleased to announce the release of
Apache Jackrabbit Oak 1.0.5. The release is available for download at:

See the full release notes below for details about this release.

Release Notes -- Apache Jackrabbit Oak -- Version 1.0.5


Jackrabbit Oak is a scalable, high-performance hierarchical content
repository designed for use as the foundation of modern world-class
web sites and other demanding content applications.

Apache Jackrabbit Oak 1.0.5 is a patch release that contains fixes and
improvements over Oak 1.0. Jackrabbit Oak 1.0.x releases are considered
stable and targeted for production use.

The Oak effort is a part of the Apache Jackrabbit project.
Apache Jackrabbit is a project of the Apache Software Foundation.

Changes in Oak 1.0.5

Bug fixes

  [OAK-2020] - NodeState view at given version is not stable with
(Continue reading)

Thomas Zastrow | 30 Aug 14:34 2014

Depricated methods in documentation

Dear all,

I'm fairly new to Jackrabbit and tried to find my way through the 
documentation. On the page about Node Types 
(, there is example code 
which utilizes


But that class seems to be marked as deprecated? Is there any newer 

Thanks and best wishes,



Dr. Thomas Zastrow
Riemerfeldring 7a

85748 Garching bei München