jackrabbit

JCR - Jackrabbit - Xpath expression for search content text of a file contained inside a node

不想你离开。 提交于 2019-12-11 14:20:06
问题 i am having a headache working with JackRabbit JCR in java. It's about making a xpath expression for searching for entities in my repository. Let's do a brief synopsis of what kind of data is stored, we have 3 a node class called "Entry", that extends another node class named "BaseEntry" and that extends another called "BaseNode". The Entry class represents a Node in our JCR system, and has a set of properties (mapped as attributes in the corresponding class), an also inherits the properties

Node Identifier of copied node in Jackrabbit not found while deleting

一个人想着一个人 提交于 2019-12-11 09:16:28
问题 I copied a node in Jackrabbit using session.getWorkspace().copy(sourceNode.getPath(), destinationNode.getPath()) This operation changes are persisted instantly as far as I know. But when I tried to get the copied node for deleting it using session.getNodeByIdentifier("nodeId of copied node") , it gives ItemNotFoundException. The reason for that error is that the copied node loses is mix:referenceable property during copy which causes getNodeByIdentifier to fail. The question is how do I set

Jackrabbit Oak: Getting started and connect to a standalone repository via RMI

我是研究僧i 提交于 2019-12-11 07:39:12
问题 I am totally new to Jackrabbit and Jackrabbit Oak. I worked a lot with Alfresco though, another JCR compliant open-source content repo. I want to start a standalone Jackrabbit Oak repo, then connect to it via Java code. Unfortunately the Oak documentation is quite scarce. I checked out the Oak repo, built it with mvn clean install and then ran the standalone server (memory repository is fine for me at the moment for testing) via: $ java -jar oak-run-1.6-SNAPSHOT.jar server Apache Jackrabbit

How do I make a WebDav call using HttpClient?

心已入冬 提交于 2019-12-11 07:30:18
问题 Specifically I want to call MKCOL through HttpClient to create a folder for Apache Jackrabbit through the Sling REST API. I've tried variants of BasicHttpEntityEnclosingRequest request = new BasicHttpEntityEnclosingRequest("MKCOL", restUrl); But no dice so far. I'm guessing this is less difficult than I'm making it. I also see there is MkColMethod for something like MkColMethod mkColMethod = new MkColMethod(restUrl); But I don't know how to utilize this. I think it may have worked with a

Access Sling's embbed Jackrabbit over RMI

本小妞迷上赌 提交于 2019-12-11 06:26:27
问题 I want to connect to the embedded Jackrabbit in Spring over RMI but can't figure out how. Is the RMI endpoint started? If not how do I start it? Thank you, Marty 回答1: http://wiki.apache.org/jackrabbit/RemoteAccess should provide the relevant info. 来源: https://stackoverflow.com/questions/12961025/access-slings-embbed-jackrabbit-over-rmi

Does the latest Jackrabbit snapshot work properly with Lucene 3?

余生长醉 提交于 2019-12-11 04:00:18
问题 I work on a Java web based app that uses both Jackrabbit and Hibernate Search. The problem I was facing was that Jackrabbit had a heavy dependency on Lucene 2 but Search requires Lucene 3 to work. I managed to do a bit of "not so nice trickery" to get this working (i.e. I had to find a way to have both Lucene 2 and 3 JARs in my WEB-INF/lib dir without any class conflicts). Although it all works fine, I want to get rid of Lucene 2 completely but Jackrabbit has been holding this up for me. I

Create a new mixin in sling

早过忘川 提交于 2019-12-11 03:34:59
问题 I am having trouble create a new custom type to the jackrabbit in apache sling using the below code. This worked fine straight on Jackrabbit but not on Apache Sling. Am I doing this correctly for sling? Thanks The following code gives me a "javax.jcr.InvalidItemStateException: Conflict". I am using a standalone sling and am the only user so there is definitely no conflict. Repository repository = JcrUtils.getRepository("http://localhost:8080/server"); Session session = repository.login(new

Advantages of deploying sling + jackrabbit on tomcat?

此生再无相见时 提交于 2019-12-10 22:29:51
问题 There are several guides how to deploy Apache Sling on Apache Tomcat. Why would you want to do that? As I understand it, this would mean you are deploying the OSGI container Felix within tomcat, and thus use a deployment system quite different from Tomcat. Even more confusing: within Felix Sling uses Jetty as servlet engine - thus you are deploying a servlet engine within a servlet engine. 8-} So, what is the point of doing this, instead of just running the launchpad as a Java standalone

How can you change the name of a JCR node?

家住魔仙堡 提交于 2019-12-10 15:09:48
问题 I'm trying to change the name of a JCR node, but I have no idea how? Has someone of you some hints? Many thanks. 回答1: The Jackrabbit Wiki provides an example: void rename(Node node, String newName) throws RepositoryException { node.getSession().move(node.getPath(), node.getParent().getPath() + "/" + newName); // Don't forget - not necessarily here at this place: // node.getSession().save(); } 来源: https://stackoverflow.com/questions/4164995/how-can-you-change-the-name-of-a-jcr-node

Jackrabbit - node.getReferences() not returning anything

痴心易碎 提交于 2019-12-10 11:38:12
问题 I'm trying to add a reference but when I call node.getReferences() I can't see it. I've tried creating a simple example -> create 2 nodes under root and reference one from the other. That works fine. In my working code it doesn't. I'm guessing it's got something to do with versioning but I can' find any doc's explaining what's going on. Let me explain the structure Root |__project node | |__ node 1 | |__ node 2 All nodes have mix:versionable and mix:referenceble. Bit of code... node1.checkout