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...
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....
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....
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)...
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...
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...
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...
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...
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 =...
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.
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...
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...
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...
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...
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...
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...
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...
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...
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...
unit-testing,junit,iterator,jackrabbit,sling
For this exists class org.apache.sling.commons.testing.jcr.MockNode and MockNodeIterator ...
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 =...
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...