Menu
  • HOME
  • TAGS

jackrabbit session.importXML() does not honour uuid

jackrabbit,jcr

Someone reason I don't see this behaviour in Database backed Jackrabbit. I have only observed the behaviour in InMemory Jackrabbit which stopped me writting my tests...

JCR explorer for RepositoryImpl

jackrabbit,jcr

As requested :) Like yourself, I couldn't find an explorer so I made a simple one with swing and JTree! Took less than a day....

Adding same name restriction to Jackrabbit nodes

jackrabbit,jcr

You set same name sibling restrictions via the parent. So you can add eg. [nt:parent] + * (cog:example) then set the type of projects Node projects = root.addNode("projects", "nt:parent"); Works for me....

Is the default CQ5 Search Configuration incorrect?

lucene,cq5,jackrabbit

The default configuration is ideed incorrect as confirmed by the Adobe CQ5 Support. For the aggegate to work correctly properties must be included by the "include-property"-Tag So the default search configuration (or atleast the documentation) is not correct https://helpx.adobe.com/experience-manager/kb/SearchIndexingConfig.html)...

“Destroying connection that could not be successfully matched”

java,jboss,jackrabbit

Just Googled and got the below link of 4.2 brancode Based on code, while retrieving connection from pool, first it checks 1. Does it has managed Connection 1a. if that has Managed Connection, it checks it is in good shape to return by doing matching algorithm. 1b. if it found...

Importing content from JSON using wcm.io AEM Mocks with a real Jackrabbit implementation

testing,aem,jackrabbit,jcr,sling

Thanks to Thomas' answer I was able to take a couple steps forward but kept facing different errors. In the meantime, I opened a topic on the wcm.io Developers mailing group to learn if a more approachable way of achieving my goals was possible. The answer is divided into two...

JCR vs JPA for a DMS: performance, benefits, drawbacks

java,jpa,jcr,jackrabbit,dms

Short version: Documents are structured or semi-structured content. Thats THE use-case for a hierarchically organized data-storage. You should go for JCR if you don't want to implement all the basic dms/cms stuff for yourself (consider this, you're probably doing it the first time, while they were doing it all the...

Jcr query multiple nodes having their abs paths

java,cq5,jcr,jackrabbit

I don't think there is a built-in method to extract many items at once given a collection of paths, however: 1. If those nodes can be found using a query (like JCR SQL), then you can use Sling's ResourceResolver.findResources or JCR's QueryManager.createQuery and execute this query. 2. If You want...

How to store images to jackrabbit and deliver those images to HTML pages?

java,jackrabbit,jcr

This is the way: public class JackRabbitServiceImpl { Repository repository = new TransientRepository(); public JackRabbitServiceImpl() throws Exception{ Session session = repository.login( new SimpleCredentials("username", "password".toCharArray())); try{ InputStream stream = new BufferedInputStream(JackRabbitServiceImpl.class.getResourceAsStream("red_rose.jpg")); Node folder = session.getRootNode(); Node file = folder.addNode("redrose.jpg","nt:file"); Node content = file.addNode("jcr:content","nt:resource"); Binary binary =...

Which maven archetype code should be selected for Jackrabbit First Hops example?

java,maven,jackrabbit

It is difficult to provide an answer without your pom file and the AppTest.java, but it seems like you are doing junit tests in AppTest.java and junit is missing in your classpath.

How does Jackrabbit generate jcr:uuid (in AEM)?

cq5,aem,jcr,jackrabbit,sling

You don't mention which version of AEM (so whether you're dealing with Jackrabbit or Oak), but the mechanism turns out to be basically the same. When assigning a default value, there are a few hard-coded system property names that get special treatment (jcr:uuid being one of them). If the name...

Hippo and Jackrabbit connection

mysql,jackrabbit,hippocms

The Jackrabbit standalone web application only works if you run Jackrabbit standalone jar or war and not if you run Hippo CMS or any other CMS based on Jackrabbit, so I'm afraid this won't work with Hippo CMS. Hippo CMS has it's own JCR browser called the Hippo CMS console...

Trimming down or capping max version history for Apache Jackrabbit JCR

jcr,jackrabbit

We just set a property, a limit on number of versions we want to keep then delete the excess. Here's an untested idea of how you could do it... public void deleteOldVersions(Session session, String absPath, int limit) throws RepositoryException { VersionManager versionManager = session.getWorkspace().getVersionManager(); VersionHistory versionHistory = versionManager.getVersionHistory(absPath); VersionIterator versionIterator...

How to setup apache jackrabbit to use MyQSL DB to store metadata and Filesystem to store files associated with that metadata

java,mysql,weblogic11g,jackrabbit

Since version 1.4, Apache Jackrabbit defines the concept of a Data Store, i.e. a separate storage for binary properties. You can define a Data Store in the repository.xml file. Further details about the Data Store are in this wiki page. In particular, you would like to define your Data Store...

How to import system view XML directly under root in Jackrabbit?

jcr,jackrabbit

An obvious solution that I should try, is to just move the "Messages" node to the root of the XML document. <?xml version="1.0" encoding="UTF-8" ?> <sv:node sv:name="Messages" xmlns...> ... </sv:node> (Unfortunately, I have multiple nodes under the root, so I'll need to create multiple XML exports. Not elegant, but probably...

Jackrabbit FirstHop example java.lang.NoClassDefFoundError

java,apache,maven,noclassdeffounderror,jackrabbit

This error, "NoClassDefFound" happens when a library is present at compile time, but then not in the runtime classpath. It almost always means that the runtime classpath is missing a JAR. You need to include the jcr jar in your classpath if you are hardcoding it. A better way is...

Create a node from within JSP using Sling API [closed]

java,cq5,aem,jackrabbit,sling

You can get a get an admin## session through SlingRepsitory object. From the session you can use jack rabbit api to create nodes. <sling:defineObjects> tag exposes sling variable (you can include global.jsp, which exposes all these variables). Sling's getService() method can be used to get an instance of SlingRepository. org.apache.sling.jcr.api.SlingRepository...

Use of MixinTypes in JCR

jackrabbit,jcr,content-repository

If you read the documentation it should be clear. "Every node has one declared primary node type and zero or more mixin node types. Primary node types are typically used to defined the core characteristics of a node, while mixin node types are used to add additional characteristics often related...

How to select similar data using SQL in JCR/jackrabbit?

sql,xpath,jcr,jackrabbit

If you are planning to use XPATH query syntax, then the jcr:like function can be used to achieve your requirements. /jcr:root//*[jcr:like(@jcr:title, '%News%')] For SQL grammar, the LIKE operator can be used for the same. select * from nt:base where jcr:title like '%News%' For SQL2, the LIKE operator can be used...

How to mock sling PropertyIterator?

unit-testing,junit,iterator,jackrabbit,sling

For this exists class org.apache.sling.commons.testing.jcr.MockNode and MockNodeIterator ...

How to escape dynamically generated String values in a JCR SQL2 query?

java,jackrabbit,jcr,jcr-sql2

Yes, you can use placeholders. Even dynamically created queries can use placeholders. As for SQL-2, you need to use single quotes, not double quotes. Example: SELECT * FROM [cq:PageContent] WHERE [aProperty] <> 'Joe''s Taxi' You only need to escape single quotes, using a single quote escape character: String aValue =...

BeanWriter not working - java.lang.NullPointerException

java,jcr,jackrabbit,hippocms

The setup application right now only supports local development with admin/admin as the username and password combination. The setup application communicates with the repository, by logging in with the admin/admin combination, so if you have changed the username password combination most actions within the setup application will fail. Where it...