Showing posts with label AEM Repository. Show all posts
Showing posts with label AEM Repository. Show all posts

May 27, 2020
Estimated Post Reading Time ~

How to create JSON file in AEM Repository

Sample Java code Snippet
Resource metadataOptionJson = ResourceUtil.getOrCreateResource(
        resolver,
        parentPath+ "/sample.json",
        Collections.singletonMap("jcr:primaryType",(Object) "nt:file"),
        null, false);
Resource metadataOptionJsonJcrContent = ResourceUtil.getOrCreateResource(
    resolver,
    metadataOptionJson.getPath() + "/jcr:content",
    Collections.singletonMap("jcr:primaryType",(Object) "nt:resource"),
    null, false);

final ModifiableValueMap metadataOptionJsonProprties = metadataOptionJsonJcrContent.adaptTo(ModifiableValueMap.class);
if (metadataOptionJsonProprties.get("jcr:data") != null) {
 // Remove the property first in case Types differ
 metadataOptionJsonProprties.remove("jcr:data");
}

metadataOptionJsonProprties.put("jcr:mimeType", "application/json");
metadataOptionJsonProprties.put("jcr:encoding", "utf-8");
final ByteArrayInputStream bais = new ByteArrayInputStream(yourjsonString.getBytes(StandardCharsets.UTF_8));
metadataOptionJsonProprties.put("jcr:data", bais);
LOG.debug(String.format("%s : %s", "Options Json ", metadataOptionJson.getPath()));
resolver.commit();


By aem4beginner

May 15, 2020
Estimated Post Reading Time ~

Is Your Repository Growing Rapidly in AEM 6?

Growth of repositories in CQ, and now AEM, have always been a pain point for most operations teams, and it is sometimes not clear where the problem stems from.

It's possible that wrong filters may have been applied, too many nodes were created, or huge renditions were also produced. Other times, it may even be a bug. In any case, Adobe has released the offline compaction method last year which is working great, and they also introduced the online compaction method. Online compaction allows you to trigger a repository compaction from within a running AEM instance via the brand new Operations & Maintenance Dashboard. It also lets you easily schedule it to ensure you have no performance hits during peak usage. Actions in the Dashboard can also be triggered via other means besides the web browser so automation of various processes is a goal that can now be achieved.

Online compaction
Before running any compactions make sure you have a consistent backup you can easily restore to in case its needed. These features are hot off the press!

1. First, get the latest hotfix of Oak which provides you this functionality from the package share for AEM 6.0 (Oak 1.0.22), with AEM 6.1 (Oak 1.2.7) it is built in!

2. Install it (there is a restart of AEM required afterwards) don't restart just stop after it is finished (make sure you tail the logs!)

3. ssh into your machine and use the oak-run.jar matching your oak version to clean up old checkpoints
-> http://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run

4. To clean up the checkpoints follow the steps below

java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore

java -jar oak-run.jar checkpoints install-folder/crx-quickstart/repository/segmentstore rm-all

5. Now start your AEM again and go to the system console -> JMX -> search for "CompactionStrategy"

6. Make sure the PausedCompaction is set to false as well as CloneBinaries

7. Go to the maintenance dashboard -> http://localhost:4502/libs/granite/operations/content/maintenance/window.html/mnt/overlay/granite/operations/config/maintenance/_granite_daily

8. On there trigger the revision cleanup and tail to logs for progress

9. The log's will tell you how much it cleaned up but you can allways check with -> du -h --max-depth=1 and compare before and after results of your repository folder

If your curious about more functionality (backup etc.) of the oak-run.jar have a look on the jackrabbit github -> https://github.com/apache/jackrabbit-oak/tree/trunk/oak-run

Offline compaction
Offline compaction can be used any time the AEM instance is stopped. This is also a prerequisite to running online compaction if you haven't removed old checkpoints previously.

To see the full effect of the online compaction later, just remove the checkpoints and don't actually run the offline compaction.

Stop your AEM instance
Use the oak-run.jar tool to find any old checkpoints -> download -> http://mvnrepository.com/artifact/org.apache.jackrabbit/oak-run

java -jar oak-run.jar checkpoints your-install-folder/crx-quickstart/repository/segmentstore
Next, delete the unreferenced checkpoints

java -jar oak-run.jar checkpoints your-install-folder/crx-quickstart/repository/segmentstore rm-all
The final step is to run the compaction and wait for it to complete (tail the logs!)

java -jar oak-run.jar compact your-install-folder/crx-quickstart/repository/segmentstore

Closing words of wisdom
Make sure you keep track of repository growth as it can easily impact performance or cause a possible outage of the instance due to the system running out of storage space.

With AEM 6, Service Pack 1 and Service Pack 2 are a necessity and should be installed. The later hotfix mentioned applies the latest Oak Fixes and raises it to a version of 1.0.11 of the Oak Core.

Note that some Service Packs and Hotfixes, such as the one for Oak, require a restart! Ensure it gets thoroughly tested beforehand, and plan it into your continuous release cycle for the next deployment to stay up to date.

UPDATE 16.03.2015:
1. If interested in details of the hotfixes have a look on Adobes Hotfix Page
2. A new Hotfix 5916 was released which addresses some possible issues with the Oak garbage collection



By aem4beginner

May 13, 2020
Estimated Post Reading Time ~

AEM Repository Structure

AEM is built on top of the OAK jcr:repository and even though we speak about applications, assets and content, in the underlying structure everything is a node in the jcr:repository.
AEM has defined a specific structure for where things are stored. The following folders are one that you should know about
  • apps
    • All applications have a folder in here
    • Applications will be discussed later
  • bin
    • All servlets generally point to /bin
    • You shouldn't install anything here
  • content
  • All content is installed here
  • dam
    • The DAM (Digital Asset Management) area is for storing assets
    • Generally, you would create a subfolder for your application
  • usergenerated
    • Stores user-generated content
    • Generally, you would create a subfolder for your application
  • <system>
    • You should have a folder for your system or base site
    • The structure under this is for you to define, however, it is generally done in the following
      • /content/<system>/<country>/<locale>/<content>
      • This structure allows for language translations via the translation api
      • While the structure can be anything you want it is best to define it early on as changing the structure at a later date is very problematic
  • etc
    • Additional configuration items
    • There are a lot of different items in the /etc folder and I will only go through the ones I think are important to know about
    • clientlibs
      • These are the system clientlibs and while should NEVER be modified it gives you access to how AEM has done its own client libs
    • designs
      • This is where the possible designs (css/js/clientlibs) are stored for the different applications
      • It is possible for a single application to have multiple designs for different visual layouts
        • This is used if you have a single application for different countries/companies e.t.c and want to have the same components but also want them to look different
  • map
    • The location of all sling mappings
    • For the publisher, I add map.publish to the /etc folder and configure it. This will be discussed in the ui.apps section on sling mappings
  • tags
    • All tags are installed here.
    • While tags are used on the content I haven't had much use for them in the applications
  • home
    • All security objects are stored here
    • users
      • As it is named all users are stored in the user's folder
      • It is recommended if you are creating specific users as part of your application deployment to add them to a new folder
      • system
        • System users are stored in the system folder
        • If your application needs to access non-standard areas for writing data i.e. /content/usergenerated it is recommended to create a system user to do this work
      • One thing to note is that users id's are very hard to figure out programmatically and when I have created users I generally create them in the useradmin screens and export them from the package manager
      • Each user id MUST be unique
    • groups
      • As it is named all user groups are stored here
      • It is recommended if you are creating specific groups as part of your application deployment to add them to a new folder
      • Groups like users have to have a unique id so it is best to create them in useradmin and export them
  • libs
    • This is where AEM stores it's core components and structures
    • Do not write anything to this area, I will explain later how to modify AEM structures
  • system
    • This is an AEM system folder and should not be used


By aem4beginner

May 12, 2020
Estimated Post Reading Time ~

AEM Repository + Interview Questions

AEM is built on top of Adobe's CRX platform. CRX is a data storage system specifically designed for content-centric applications. AEM uses this content repository to store all its web content, digital assets, scripts, Java libraries, configuration information, and other data. CRX implements the Content Repository API for Java Technology (JCR). This standard defines a data model and application programming interface (that is, a set of commands) for content repositories.

For more information click here

Interview Questions
Note: For more on Apache Jackrabbits watch this video

1. What is JCR?
A content repository, as defined by JCR, combines features of the traditional relational database with those of a conventional file system.
File system-like features supported by JCR include:
  • Hierarchy: Content in a JCR repository can be addressed by path. This is useful when delivering content to the web since most websites are also organized hierarchically.
  • Semi-structured content: JCR can store structured documents, like XML, either as opaque files (as a file system would) or as structures ingested directly into the JCR hierarchy.
  • Access Control and Locking: JCR can restrict access to different parts of the content hierarchy based on policies or ACLs. It also supports locking of content to prevent conflicts.
2. Why to use oak indexing?
Unlike Jackrabbit 2, Oak does not index content by default. Custom indexes need to be created when necessary, much like with traditional relational databases. If there is no index for a specific query then the whole repository will be traversed For more information https://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade/queries-and-indexing.html

3. Explain David's content model.
David Model:
  • Data First, Structure Later. Maybe.
  • Drive the content hierarchy, don't let it happen.
  • Workspaces are for clone(), merge() and update().
  • Beware of Same Name Siblings.
  • References considered harmful.
  • Files are Files.
IDs are evil. For more information https://docs.adobe.com/docs/en/cq/5-6/howto/model_data.html

4. Difference between CRX 2 and CRX 3.


5. Why we need TAR Compaction?
If we are using Tar files as the storage, it tends to grow in size and starts claiming disk space every time when data is created or updated as data in tar files are never overwritten rather it keeps adding new versions. To mitigate the same, AEM has garbage collection mechanism which is known as ‘Tar Compaction’ to remove the unused data and reclaim the disk space. To perform TAR Compaction, please follow this blog http://www.aemcq5tutorials.com/tutorials/online-offline-tar-compaction-in-aem/

6. You have created a bundle with CRXDE. What does the .bnd file contain?
The .bnd file contains extra metadata about the bundle used by the CRXDE build process.

7. You want to install bundles through CRX only in the author instance. Which folder name can you use for that purpose?
All folders named install.author.

8. You want to request a JSON representation of the content. What do you have to do with the request?
Change the extension to .json.

9. Which access control policies does the JCR Session define to manage nodes?
Privileges to access the JCR workspace define to manage nodes


By aem4beginner

May 10, 2020
Estimated Post Reading Time ~

Structure within the AEM Repository

Caution:
You must not change anything in the /libs path. For configuration and other changes copy the item from /libs to /apps and make any changes within /apps.

/apps
Application related; includes component definitions specific to your website. The components that you develop can be based on the out of the box components available at /libs/foundation/components.

/content
Content created for your website.

/etc
Tools section for detailed information.

/home
User and Group information.

/libs
Libraries and definitions that belong to the core of AEM. The sub-folders in /libs represent the out of the box AEM features as for example search or replication. The content in /libs should not be modified as it affects the way AEM works. Features specific to your website should be developed under /apps .

/tmp
Temporary working area.

/var
Files that change and are updated by the system; such as audit logs, statistics, event-handling. The sub-folder /var/classes contains the java servlets in source and compiled forms that have been generated from the components scripts.


By aem4beginner

Connect to the JCR repository using a simple Java main method.

When using Adobe Experience Manager (CQ) as our content management tool we sometimes need to connect to an AEM JCR repository from our integrated development environments (IDE) like Eclipse or NetBeans.

The following code shows a simple executable Java program for connecting to any AEM JCR Repository using a main() method. This can be used to connect to any remote or local JCR repository.

The Steps to do so are as follows:

Step1:
Download the Jack Rabbit Jar File form
http://www.apache.org/dyn/closer.cgi/jackrabbit/2.8.1/jackrabbit-standalone-2.8.1.jar and place the Jack Rabbit jar in the build path of your project.


Step 2:
File: ConnectJCR.java

package net.codermag.jcr.test;

import javax.jcr.Node;
import javax.jcr.NodeIterator;
import javax.jcr.Repository;
import javax.jcr.Session;
import javax.jcr.SimpleCredentials;

import org.apache.jackrabbit.commons.JcrUtils;
import org.apache.jackrabbit.core.TransientRepository;

public class ConnectJCR {

 public static void main(String[] args) throws Exception {
  Repository repository = new TransientRepository();
  repository = JcrUtils.getRepository("http://localhost:4502/crx/server");

  // Create a Session
  Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
  //If you get javax.jcr.lock.LockException please use the line below
  //instead of the above one
  //Session session = repository.login( new SimpleCredentials("admin", "admin".toCharArray()),"crx.default");
  
  // Create a node that represents the root node
  Node root = session.getRootNode();
  Node content = root.getNode("content");
  Node subContent = content.getNode("dam");

  //Getting the iterator over the nodes
  NodeIterator childNodeIterator = subContent.getNodes();

  //Iterating over the nodes and printing their names
  while(childNodeIterator.hasNext()){
   Node childNode=(Node) childNodeIterator.next();
   System.out.println(childNode.getName());
   
  }
 }
}

javax.jcr.lock.LockException: Precondition Failed
If you are getting the javax.jcr.lock.LockException with the above program then please follow this link
http://www.codermag.net/2016/10/how-to-fix-javax-jcr-lock-lockexception-precondition-failed.html



By aem4beginner

May 9, 2020
Estimated Post Reading Time ~

How to get Repository access in AEM

@Reference private SlingRepository repository;
@SuppressWarnings("deprecation")
@Reference
private JcrResourceResolverFactory resolverFactory;

private ResourceResolver resolver;
private Session session;

session = repository.loginAdministrative(null);
resolver = this.resolverFactory.getResourceResolver(session);

From here you will get the root node whichever you wants---
rootNodePath="/content/dam";
Node rootNode = session.getNode(rootNodePath);

From this rootNode, you can trace all the sub-nodes.


By aem4beginner

Repository inconsistency issue in AEM

---------------------------------Unable to read Bundle ......-------------------------

If you are facing some problem related to this, then here is the solution.
----> This is because of abnormal closing of the instance or corrupted the indexes. Reindexing required for your instance. Some times because of failed to access the repository.
----> Building the indexes means it will fetch the data from the data tar file in the repository.

For this, we need to delete the index files from the cq root folder.

Here specifying the folder paths, but make sure take a backup of repository--<br/>
--The total process may take hours of time depends on the repository size. But be ready to face downtime.

\author\crx-quickstart\repository\repository---delete index folder
\author\crx-quickstart\repository\tarJournal---delete all index_*.tar
\author\crx-quickstart\repository\version------delete all index_*.tar
\author\crx-quickstart\repository\workspaces\crx.default---delete index folder and delete all index_*.tar

Now Start your instance through the server.bat file
You will notice that the Multi-indexing will start........Each and every information will be available in logs.
After that please run these steps for better performance.

1)Tar optimization
2)Tar Index-merge
3)Data-store garbage collection

<br/>I tested and succeded with the cq 5.4 version..<br/>
I hope it useful. Please Don't try directly with the production server.


By aem4beginner

April 27, 2020
Estimated Post Reading Time ~

How to create Repository Nodes thorough Java API in AEM

We can create the repository nodes inAdobe Experience Manager(AEM) through Java API, the below code snippet will help us to create the nodes in Adobe Experience Manager(AEM).

private static final String BASE_PATH = "/etc/commerce/products"; // the folder under which the nodes should be created

//Get the Resource resolver from request - Creating the node through Servlet
ResourceResolver resolver = request.getResourceResolver();

//Get the Resource resolver through resolver factory - Creating the node through Service
@Reference
private ResourceResolverFactory resolverFactory;//Get the resolverFactory reference in the service

ResourceResolver resolver = resolverFactory.getAdministrativeResourceResolver(null);//Get the resolver

//Get the session
Session session = resolver.adaptTo(Session.class);

//Create the Node
Node node = JcrUtil.createPath(BASE_PATH+<<Node Name>>, JcrConstants.NT_UNSTRUCTURED, session);

//Set the required properties
node.setProperty("name", "sample");
node.setProperty("description", "sample");

//Save the session
session.save();

While creating the NT_UNSTRUCTURED node make sure the parent folder is sling:folder, the node will not be created if the parent node is of type nt:folder.


By aem4beginner

April 26, 2020
Estimated Post Reading Time ~

Offline Compaction - AEM Repository Size Growing Rapidly

Sometimes we observe AEM repository size increase rapidly. This post helps you in decreasing the respository size

AEM Repository Offline Compaction
Create new folder compact and place oak-run-1.2.2.jar and below .bat file.
Create a .bat file containing below code
java -jar oak-run-1.2.2.jar compact C:\Users\Kishore\AEM\crx-quickstart\repository\segmentstore

Download oak-run-1.2.2.jar


By aem4beginner

April 24, 2020
Estimated Post Reading Time ~

Search in AEM repository

In the last session, we have seen how to add a property to a JCR node. We primarily created a resourceResolver object and created a resource using the path to the node where we wanted to set the property. Converted the resource into a Node using the adptTo() method. And, then used the setProperty() method to set the property. Finally, we created a session object in a similar manner and then saved the property.

In this session, we will see how to perform a basic search option. There are many ways to accomplish the same. We will see the simplest way. The intention is to be cognizant of how a search operation is performed. In the repository, we will search for the page that contains a property author which is set to Sunil.



  • Go to the SearchService.java interface and add the following method:
  • public String getResult();
  • In the SearchServiceImpl class, create a Resource Resolver. We have discussed this in length in the previous sessions. 
  • Map<String, Object> param = new HashMap<String, Object>(); param.put(ResourceResolverFactory.SUBSERVICE, "readService"); ResourceResolver resourceResolver=null; resourceResolver = resolverFactory.getServiceResourceResolver(param);
  • Create a session object using the adptTo method.
  • Session session = resourceResolver.adaptTo(Session.class);
  • Create a QueryManager object as follows:
  • javax.jcr.query.QueryManager queryManager = session.getWorkspace().getQueryManager();
  • Create a query String. We need to find the page that contains author property as Sunil.
  • String sqlStatement = "SELECT * FROM [cq:PageContent] WHERE CONTAINS(author, 'Sunil')";
  • Create a JCR query.
  • javax.jcr.query.Query query = queryManager.createQuery(sqlStatement,"JCR-SQL2");
  • Obtain the result as follows:
  • javax.jcr.query.QueryResult result = query.execute();
  • Create a JCR node iterator and convert the result into an iterator.
  • javax.jcr.NodeIterator nodeIter = result.getNodes();
  • Use the following code to find the node and get its properties, such as author and title.
  • while ( nodeIter.hasNext() ) { LOGGER.info("From the search"); javax.jcr.Node node = nodeIter.nextNode(); title = node.getProperty("jcr:title").getString(); author = node.getProperty("author").getString(); }
  • Return author.
  • Access the bundleservice component. Add the following code in the default script.<%= searchService.getResult()%>
  • Refresh the page we created. It should display the value of the author's property.


By aem4beginner

April 23, 2020
Estimated Post Reading Time ~

AEM 6.3 Maintenance activities or Performance tuning or How to prevent the repository growth

Statement: Unusual Repository growth:
Environment: AEM 6.3
Perform the below activities for the maintenance of AEM server to avaoid the repository growth on daily or weekly Basis

v Turn on DAM asset update workflow model to Transient model: https://aemexperts.blogspot.sg/search/label/Workflow to 10% workflow processing specifically for the DAM update asset workflow.
v Use the DAM update assets offloading workflow: https://aemexperts.blogspot.sg/2018/05/aem-dam-update-asset-offloading.html to improve the Master author server performance

v Follow the https://helpx.adobe.com/experience-manager/kb/performance-tuning-tips.html

v Workflow purge maintenance :
§ Go to this https://localhost:5443/libs/granite/operations/content/maintenanceWindow.html/libs/settings/granite/operations/maintenance/granite_weekly#
§ Mouse over on the workflow purge
§ Click on the run (play icon)
§ After completion it show yes green mark stating the last and next run for this activity

v Workflow Archive
§ Go to this path https://localhost:5443/libs/cq/workflow/admin/console/content/archive.html
§ Select all and delete
v Workflow Failure
§ Go to this path https://localhost:5443/libs/cq/workflow/admin/console/content/failures.html
§ Select all and delete

v Version Purge maintenance
https://localhost:5443/libs/granite/operations/content/maintenanceWindow.html/libs/settings/granite/operations/maintenance/granite_daily
§ Mouse over on the version urge
§ Click on RUN(play icon)
§ That’s it!
§ Click on Configure icon to configure to change the scheduling.



v Audit Log Purge maintenance
§ Go to this path https://localhost:5443/libs/granite/operations/content/maintenanceWindow.html/libs/settings/granite/operations/maintenance/granite_weekly
§ Mouse over on the Audit log maintenance
§ Click on run (play icon)

v Revision cleanup
§ Go to this URL https://localhost:5443/libs/granite/operations/content/maintenanceWindow.html/libs/settings/granite/operations/maintenance/granite_daily
§ Mouse over on the revision cleanup
§ Click on RUN
§ That’s it!
§ Click on Configure icon to change the auto schedule details

v Datastore Garbage Collection
§ Go to this path https://localhost:5443/libs/granite/operations/content/maintenanceWindow.html/libs/settings/granite/operations/maintenance/granite_weekly#
§ Mouse over on the datastore garbage collection >> click on the Run(play icon)
§ After some time it shows the activity has been completed and shows Yes Green mark

v Index Manager
§ Go to this path https://localhost:5443/libs/granite/operations/content/diagnosis/tool.html/granite_oakindexmanager
§ Select the node name for the reindex
§ Click on the reindex or bulk index
§ Monitor the log files for the start and completion of indexing


v Monitor the logs
§ https://localhost:5443/libs/granite/operations/content/diagnosis/tool.html/granite_logmessages
§ Monitor the error.log, Warning, info and Debug level messages
§ Take action based on the error message
§ Critical errors will be highlighted on red color
  • Datastore consistency Check
  • Perform the Online or offline compaction
  • Disable the External link checker
  • Oak session expiration set to 1hr by default


By aem4beginner

Fix Inconsistencies by restarting AEM when SegmentNotFound Issue is reported in AEM 6.3

Follow the URL:

https://helpx.adobe.com/experience-manager/kb/fix-inconsistencies-by-restarting-AEM-when-segmentNotFound-issue-is-reported-in-AEM.html


By aem4beginner

Disk usage is in AEM 6.3 server is abnormally and rapidly increasing on an AEM server.

Statement: Rapid growth in Repository size

Follow the below URL:
https://helpx.adobe.com/experience-manager/kb/analyze-unusual-repository-growth.html


By aem4beginner

Prevent rapid repository growth caused by Link Checker

Issue: Repository growth
Recommendation
Starting from CQ 5.6.1, the referencedBy property has been introduced in order to keep track of the pages that reference the same link.

However, in case a link such as external links in the page footers is referenced from too many pages, Linkchecker performs a lot of JCR writes/update causing CPU peaks as well as performance decreases, mainly caused by the JCR locks.

To verify if the repository growth is related to the linkchecker, enable TRACE log level for org.apache.jackrabbit.oak.jcr.operations.writes during a few minutes, and check if the majority of the writes are below /var/linkchecker. Then do not forgot to disable the TRACE log level.

In such cases where performance is compromised by this linkchecker behavior, it is recommended to disable this feature by following the steps below:

Solution
1. Delete /var/linkchecker (it will be recreated automatically)

2. In the OSGI configuration console, open Day CQ Link Checker Info Storage Service and deselect "Save external link references” option and save.

Please note that disabling this option will not cause automatic removal of the existing referenced property values. To achieve this, first, remove /var/linkchecker.


By aem4beginner

April 22, 2020
Estimated Post Reading Time ~

How to find the repository properties in AEM through Felix console

Statement - Repository properties of AEM
Environment - AEM 6.3 GA

Solution:
Go to the Felix console URL: https://localhost:4502/system/console/status-Repository%20Apache%20Jackrabbit%20Oak
login with username and password if not logged into the AEM server.
Below screenshot shows the list of repository properties

Repository Properties:
crx.cluster.id: 26eb16c2-ac36-4631-8783-c229474ae7b22
crx.cluster.master: true
crx.repository.systemid: b6e06f32-20a1-4fa0-869d-7a798282fded
identifier.stability: identifier.stability.method.duration
jcr.repository.name: Apache Jackrabbit Oak
jcr.repository.vendor: The Apache Software Foundation
jcr.repository.vendor.url: http://www.apache.org/
jcr.repository.version: 1.6.1
jcr.specification.name: Content Repository for Java Technology API
jcr.specification.version: 2.0
level.1.supported: true
level.2.supported: true
node.type.management.autocreated.definitions.supported: true
node.type.management.inheritance: node.type.management.inheritance.single
node.type.management.multiple.binary.properties.supported: true
node.type.management.multivalued.properties.supported: true
node.type.management.orderable.child.nodes.supported: true
node.type.management.overrides.supported: true
node.type.management.primary.item.name.supported: true
node.type.management.property.types: -
node.type.management.residual.definitions.supported: true
node.type.management.same.name.siblings.supported: false
node.type.management.update.in.use.suported: false
node.type.management.value.constraints.supported: true
oak.clusterid: 26eb16c2-ac36-4631-8783-c229474ae722
oak.discoverylite.clusterview: {"seq":1,"final":true,"me":1,"id":"26eb16c2-ac36-4631-8783-c229474ae7b6","active":[1],"deactivating":[],"inactive":[]}
option.access.control.supported: true
option.activities.supported: false
option.baselines.supported: false
option.journaled.observation.supported: false
option.lifecycle.supported: false
option.locking.supported: true
option.node.and.property.with.same.name.supported: true
option.node.type.management.supported: true
option.observation.supported: true
option.principal.management.supported: true
option.privilege.management.supported: true
option.query.sql.supported: false
option.retention.supported: false
option.shareable.nodes.supported: false
option.simple.versioning.supported: false
option.transactions.supported: false
option.unfiled.content.supported: false
option.update.mixin.node.types.supported: true
option.update.primary.node.type.supported: true
option.user.management.supported: true
option.versioning.supported: true
option.workspace.management.supported: false
option.xml.export.supported: true
option.xml.import.supported: true
query.full.text.search.supported: false
query.joins: query.joins.none
query.languages: -
query.stored.queries.supported: false
query.xpath.doc.order: false
query.xpath.pos.index: false
write.supported: true


By aem4beginner

How to reset the Repository ID in AEM

Statement: Assuming you have cluster setup and you are cloning one of the server and starting as a standalone but the repository ID is still pointing to the cluster instance. So how to change the Repository ID to avoid once again clustering of the standalone instance.

Solution:

  • Use oak-run resetclusterid command
java -jar oak-run.jar resetclusterid crx-quickstart/repository/segmentstore
  • where - Download Oka version based on the Repo version of AEM server
  • Go to JMX console: http://localhost:4502/system/console/jmx
  • Search for BLOBGarbageColelction and Open it and validate the repository id, this should be different.


By aem4beginner

How to take online repository backup and perform the Datastore GC and revision GC for AEM 6.3

Statement: Online repository backup
Solution:
Go to this URL: http://localhost:4502/system/console/jmx/org.apache.jackrabbit.oak%3Aname%3Drepository+manager%2Ctype%3DRepositoryManagement
Click on startBackup() and Click on Invoke to start the Backup and it Creates a backup of the persistent state of the repository
As shown in the below screenshot


In the below Screenshot highlighted section shows repository Backup is in Progress.



How to restore the repository post backup



Status of restore



How to startDatastoreGC to retrieve BLOB reference




Full GC run



Full GC log



How to start Revision GC



How to initiate PropertyIndexAsync re-indexing

Status of all repository Managment


How to refresh all open sessions



Different Types of Repository management operation

That's it!.


By aem4beginner

Preventing Repository Corruptions in AEM 5.6/5.4

Preventing Repository Corruptions
  • Add the below line of code to the start.sh file
  • CQ_JVM_OPTS =
'-Dorg.apache.jackrabbit.core.state.validatehierarchy=true'


By aem4beginner

April 20, 2020
Estimated Post Reading Time ~

Repository restructuring in AEM 6.4

AEM product code will always be placed in /libs, which must not be overwritten by custom code
Custom code should be placed in /apps, /content, and /conf


Starting from AEM 6.4 (see https://helpx.adobe.com/experience-manager/6-4/sites/deploying/using/repository-restructuring.html) content repository is to be reorganized prior to 6.5, and finally in 6.5 most probably will follow the rule as below:
  1. /etc should not be used (probably to be removed)
  2. any application code, clientlibs should be located under /apps
  3. any runtime data to be under /var or /content folder,
  4. while the configurations should be rather under /conf
The groovy console should have its own content structure to be reorganised as follows:
  1. /etc/clientlibs/groovyconsole should rather go to /apps/groovyconsole/clientlibs
  2. /etc/groovyconsole to /apps/groovyconsole
  3. /etc/groovyconsole/scripts should go to /conf/groovyconsole/scripts or /var/groovyconsole/scripts
  4. /etc/groovyconsole/jcr:content/audit should to to /var/groovyconsole/audit


By aem4beginner