jackrabbit

How to store randomly accessed files (both on writing and reading) in Jackrabbit JCR implementation?

Is it possible to store randomly accessed files (both on writing and reading) in Jackrabbit JCR implementation, if documentation says that DataStore interface stores data immutable. ...

maven conditional dependencies

We would like to bundle library dependencies from (Alfresco or Jackrabbit or ...) based on the customer choice. The number of dependencies actually varies based on the chosen vendor. How do we provide hooks at the maven level, so that the final product just includes the dependent jars as per customer selection. ...

Java JCR: Correspondance between parent and child node versions

Hello. I am using Jackrabbit and I have the following question: I have a parent node P and a child node C. Both P and C are versionable. At some point in my code I need to get data from a previous version V of P, so I use getVersionHistory().getVersion(V).getNode("jcr:frozennode") in order to get the version I need. In this version howev...

How to deploy maven artifacts if they are not present in the central repository

What would be the mechanism to deploy rar artifacts if they are not present in the repository. (e.g. I would like to deploy jackrabbit to my j2ee application, but it is not available as part of the maven repositories. Should I have to store the binary locally in SVN and use the antrun plugin to copy it? ...

Can we use JCR API over MySQL?

Apache Jackrabbit (or the JCR API) helps you separate the data store from the data management system. This would mean that every data store provider would have to implement the JCR API for his own data store. The question is JCR implemented for MySQL? Can we use the JCR API over MySQL? I want to truly abstract out where i store my conten...

How to deploy a rar file to jboss

Refer original post here for a reference to the original issue. What plugin should I use to deploy the jackrabbit rar as a separate entity to the jboss installation. I tried the rar module within the maven-ear-plugin which was actually packaging this within the ear file and the rar plugin which seems to be used for packaging a rar. Curre...

Jackrabbit version delete -- name is unexpected

I'm using Apache Jackrabbit to store versioned data. I'm following the template listed on the Jackrabbit wiki for versioning basics, but there's one thing that isn't working as expected. After I run the code from the wiki, I try saving another version of the node, then getting its version string: child = parentNode.getNode("childNode")...

Binding Jackrabbit Standalone server repository to Tomcat as jndi resource using http url

Is there a way to bind the Jackrabbit Standalone Server repository to Tomcat using http url? In server.xml, instead of the ClientRepositoryFactory(which is for RMI): <Resource name="jcr/globalRepository" auth="Container" type="javax.jcr.Repository" factory="org.apache.jackrabbit.rmi.client.ClientRepositor...

Password encryption in Jackrabbit

I am currently standing up a Liferay portal instance. Liferay uses Jackrabbit as its document repository management system. To configure Jackrabbit, I had to put in my database access URL, user name, and password into the repository.xml file. However, one certification check I have to pass is that there cannot be passwords stored in p...

How do you restore a "versioned node" in a jackrabbit 2.1 repository?

Once a node has been deleted, how do you locate it so that you can restore it using jackrabbit or the jcr APIs? ...

how can I get list of revisions of file from webdav repository on client side

I'm getting list of files via PropFindMethod: DavMethod pFind = new PropFindMethod(url, DavConstants.PROPFIND_ALL_PROP, DavConstants.DEPTH_1); httpClient.executeMethod(pFind); MultiStatus multiStatus = pFind.getResponseBodyAsMultiStatus(); MultiStatusResponse[] responses = multiStatus.getResponses(); for (int i = 0; i < responses.length...

NPE when i update custom node

Hi all I am trying to upgrade jackrabbit version in my project from 1.6 to 2.1.1. Some things from 2.1.1 are very usable. After transition on new version i get "magic" problems. I often catch NPE exception from inside jackrabbit api. After some investigations and tests i had found one of many problems. What i do in my test? I declare c...

Can't remove version in Jackrabbit

I'm trying to remove a version from the version history and I'm getting javax.jcr.ReferentialIntegrityException: Unable to remove version. At least once referenced. When I try to remove all references to the version it seems like there aren't any and still does not allow me to remove the version. I am sure that this is not the root vers...

Problems with hyphen in Jackrabbit XPath query

Firstly, let me just say that I'm very new to JSR-170 and Jackrabbit/Lucene in general. I have the following XPath query: //*[@sling:resourceType="users/user-profile" and jcr:contains(*/*/*,'sophie\-a')] order by @jcr:score descending I have a user named Sophie-Allen and a user named Sophie-Anne. Searching using the above query retu...

Custom JCR (Jackrabbit) node property type

Hi, I want to use an enum constant for a property value in jackrabbit. However the Node.setProperty() only accepts primitive types, String and Value as property value types. I looked through the ValueFactory interface, but that also seems like it can't help me. In other words I want to do this: node.setProperty("name", Enum.Const); ...

Simple JCR_SQL2 query returns nothing on Jackrabbit 2.1.1

Hi, I have this simple JCR_SQL2 query: SELECT * FROM [my:type] I'm running it like so: final QueryManager qMan = session.getWorkspace().getQueryManager(); final Query q = qMan.createQuery("SELECT * FROM [my:type]", Query.JCR_SQL2); final QueryResult qResult = q.execute(); return qResult.getNodes(); on a workspace which is indexed (a...

JCR checkin/checkout operations

Hi guys, I'm just starting to work with JCR (apache jackrabbit), i want to ask simple question (because i coudn't find good tutorial for it): So for what do i need Node.checkout and Node.checkin methods? What do they mean? Thx ...

How to switch jackrabbit persistence from filesystem to database?

I have a Liferay portal that was configured to use filesystem persitence for jackrabbit. It seems like this persistence mode creates a lot of files on the filesystem (so far something like 113'000) and I'm slowly reaching the file count quota of the server. I would like then to switch to database persistence. I know how to configure i...