ippon | 21 Aug 16:05 2014

How to access a standalone Oak Server from a webapp?


Another (assumably quite stupid) question:
How can I get a connection to a standalone Oak repository from a webapp?

I tried to retrieve a javax.jcr.Repository via "(new
OakRepositoryFactory()).getRepository(parameters)", passing in the URI of
the started Oak repository using the key
"org.apache.jackrabbit.repository.uri"; the problem is just that the
OakRepositoryFactory simply ignores this URI an returns only a "default
repository" within RAM by calling "new Jcr().createRepository()"... :-/

I couldn't find any other(?) way how to access a remote Oak repository, so a
short hint (or - even better - an example) would be very helpful!

Thanks in advance,

View this message in context: http://jackrabbit.510166.n4.nabble.com/How-to-access-a-standalone-Oak-Server-from-a-webapp-tp4661269.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Oren Zamir | 20 Aug 16:44 2014

SessionImporter bug?


While trying to do an importXML for a sub node that is of a type nt:folder we were getting exceptions  -
"javax.jcr.ItemExistsException: Node with the same UUID exists"

However, the node has no Id and the existing node does have an id. Further investigation pointed us to the
following block of code -

if (!(existing.getId().equals(id)
                            && (uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING
                            || uuidBehavior == ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING))) {
                        throw new ItemExistsException(
                                "Node with the same UUID exists:" + existing);

Even with the uuidBehavior set to any enum it will throw an exception when the id = null (from the imported xml).

Is this a bug?



ippon | 20 Aug 12:00 2014

LDAP Configuration issues :-/


I'm quite new to JackRabbit, but have to implement LDAP authentication &
authorization for a JackRabbit repository within an JEE project (using
currently JackRabbit 2.6.5 & JBoss).

What I did up to now:
- Configuration of DefaultSecurityManager with SimpleWorkspaceAccessManager
  (the only way to get access to the "default" workspace with LDAP!?)
- Configuration of DefaultAccessManager
- Configuration of LdapLoginModule
  (Access to LDAP works in principle!)

My problem(s):

1.) Importing of the content model into an empty repository with CndImporter
seems to work only with the SimpleAccessManager (which is by fact no
security at all)!? 
That's more an "cosmetic" issue, but if there's a way around it would be
really nice...

2.) Whenever I try to create an object within the repository with
LdapLoginModule & DefaultAccessManager, I run into an exception
"javax.jcr.AccessDeniedException: cannot read item
cafebabe-cafe-babe-cafe-babecafebabe" - which is as far as I could see in
the debugger, because JackRabbit tries to read the root node, finds no ACL
(just a hypothesis) and refuses therefore the access to this node!?

What works fine but is quite too simple for my needs, is creating &
accessing the repository with SimpleSecurityManager & SimpleAccessManager &
(Continue reading)

Julián | 10 Aug 13:54 2014

Help for a new user

(sorry for my english)
I'm very new at java, javaEE,  web-development world, and, of course, jackrabbit environment.
I'm a student and I'm working in my degree project. An "easy" document management system.
I only need users to get their documents and to be able to search groups of words into them (PDF, DOC, XLS ...)
like a google search.
I've heard about jackrabbit's benefits, so I've decided to use it. (I suposse jackrabbit can do those task ?)

I am developing an "easy" JSF application with Primefaces, Mysql... and now, I'm in the phase when I have to
manage the documents.
I've read the JSR 283 specification, and I undestand it more or less. My  problem is how to begin.

I need someone to show me a simple example to create and access a repository. The repository only have to work
with my application in a tomcat server.
I've been looking for information on the Internet and I'm absolutely lost. Everyone say different things.
I haven't been able to find an "easy" example about I need.
In Jackrabbit's web, I've been reading about deployments models, stand-alone server,  Jackrabbit Web
application, Jackrabbit JCA Resource Adapter ...
Oh my god! Is it really so difficult what I want to do? I don't think so, perhaps I'm getting older...

I only need:
1º when a client access the application for the first time, the repository will be created in a specified path.
2º Clients will upload files, search for content, and download them.

I'm now in the first point. Can anyone help me?
I use the eclipse IDE and I don't use maven.
What "jars" must I include in my classpath?
what java instructions do I need to create and set up the repository? In the JSR specification, they use the
RepositoryFactory class. Is it the way to do it?

Thanks a lot, and sorry for my ignorance.
(Continue reading)

Tarek Jarraya | 10 Aug 12:12 2014

java good practices to interact with standalone Jackrabbit

Hi All,

I am using Jackrabbit 2.8 with standalone deployment. I interact with it
from java web application based on spring 3, running in tomcat 7 in the
same machine. In my design I use DAO (singleton) to interact with

What is the good practices to interact with:
1) do I have to initiate a session in each method and close or save it at
the end? Or one session will be enough during application runtime?
2) currently I use rmi protocol. is it the good choice?

Thanks in advance for your help,
Andrew Khoury | 9 Aug 01:39 2014

Re: How to get total nodes in Oak repo

Hi Chetan,
How about for TarMK?  What is the quickest way to calculate total nodes?

On 8/7/14, 10:37 PM, "Chetan Mehrotra" <chetan.mehrotra <at> gmail.com> wrote:

>At JCR level traversal is the only option. For Mongo based deployment
>you can get a rough estimate via ds.nodes.stats() command.
>- count - This property provides an estimate of number of nodes
>- It also includes the nodes which store the index data. Note that
>these index are Oak indexes and are different from Mongo indexes
>- It also includes nodes which are marked deleted but yet not garbage
>$ mongo <server>:<port>/<db>
>$ db.nodes.stats()
>$ {
>        "ns" : "aem-author.nodes",
>        "count" : 593688,
>        "size" : 453287536,
>        "avgObjSize" : 763,
>        "storageSize" : 629633024,
>        "numExtents" : 16,
>        "nindexes" : 5,
>        "lastExtentSize" : 168742912,
>        "paddingFactor" : 1,
>        "systemFlags" : 0,
>        "userFlags" : 1,
(Continue reading)

Andrew Khoury | 7 Aug 21:45 2014

How to get total nodes in Oak repo

What is the quickest and most efficient way to get the total number of nodes in an Oak repository?  Is there a
built in way or do I need to do a full traversal or query?
Andrew Khoury
Thomas Mueller | 5 Aug 08:00 2014

[ANNOUNCE] Apache Jackrabbit Oak 1.0.4 released

The Apache Jackrabbit community is pleased to announce the release of
Apache Jackrabbit Oak 1.0.4. 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.4


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.4 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.4


  [OAK-1999] - Query engine is slow when using many "or" constraints
  [OAK-1997] - Improve the message in UniquenessConstraintViolation
(Continue reading)

Torgeir Veimo | 4 Aug 16:39 2014

oak: allowing sns for nt:file using mixin

I have a mixin I use with nt:file nodes to allow some same name
sibling child nodes (when of a specific node type).

Is this not supported with oak? I am getting
javax.jcr.ItemExistsException when I add several child nodes with the
same name, while it works in jackrabbit 2.8.



zamron.m | 1 Aug 18:42 2014

Exception while tryng to connect to Oak via WebDav

Hi, this is my first post, :)
I've a java application to connect to Jackrabbit that uses the WebDav
libraries. It worked using Jackrabbit but when tried with "Oak" (1.0.3) it
has stopped  working.

Specifically i can connect to Oak, i receive a positive message, but when
trying to do the loging i receved the following exception:
/org.apache.jackrabbit.webdav.DavException: Method PROPFIND is not defined
in RFC 2068 and is not supported by the Servlet API

*Complete log of the exception:*
250 [main] INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor -
basic authentication scheme selected
251 [main] INFO org.apache.commons.httpclient.HttpMethodDirector - No
credentials available for BASIC 'Oak' <at> localhost:4502
251 [main] WARN org.apache.jackrabbit.spi2dav.RepositoryServiceImpl -
Authentication required to access repository descriptors
Missing implementation
javax.jcr.UnsupportedRepositoryOperationException: Missing implementation
(Continue reading)

lod | 30 Jul 17:54 2014

index rebuild

In our use of jackrabbit we have had times occur where our indices have
gotten screwed up, and we have deleted and rebuilt them to fix our issues.
 As our content grows, this solution is not really viable as the rebuild
process consumes way too much time.  We are looking for solutions to:
a. What is the possible cause of the indices to become corrupt?
b. How can we detect which are corrupt and which are still valid, and how
do we fix just those that have become invalid.

On looking at the options for SearchIndex in repository.xml and
workspace.xml, I see the options for enableConsistencyCheck,
forceConsistencyCheck, and autoRepair.  If these parameters are all
enabled, will this allow us to detect when the indices get bad and repair
If so, how often is this checking occurring?
Does it cause any performance degradation to have these parameters enabled?



Storm - FG40K, MBDCh-G, TFP, SM, JM,  AAD, AJ, AS, AG, AR, SJ, SS, SR, SG,
Rogue - ONYX, MBDCH-S, TFP, AD, AG, SJ, SR, NAJ, CL3-F, CL2  (
Longshot - noisy little puppy, dock-diving phenom, cuddler extraordinare

at the bridge:
Banshee - FM, MBDCh-S, TF-II, NAP, NJP, RN, CGC, TDI
(Continue reading)