Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Connecting AEM server remotely from the external java web application.

Avatar

Level 2

Hi ,

We have requirement to use our existing java web application to create/modify nodes , templates and pages through our java web application remotely into the AEM CRX repository. Like creating /updating nodes through cURL command. Instead of using cURL commands , we are planning to write java codes to make connection with existing AEM CRX server and doing the same operation such as create/modify content in the  existing CQ pages.

We are trying to connect AEM CRX server from the J2EE web application/ otherwise traditional java servlet and not using any frameworks.

However i am getting lot of exceptions , eventhough i have included all the necessary dependency files in maven pom.xml.

Here is the link that i used as reference to connect to CRX server externally.

Adobe Experience Manager Help | Programmatically Accessing Adobe Experience Manager Content using th...

Here all my questions,

is there any way that we connect AEM CRX repository through the traditional Java web application?

can we create/update existing AEM pages through remotely which means through extenal java applications ,which is running in different web app server?

Thanks

Arun

1 Accepted Solution

Avatar

Correct answer by
Level 10

I will test against AEM 6.2 and post back. But as I recall, you need to include the JAR in your apps class path for the connection to be successful. It will compile with POM dependency, but won't connect without adding JAR to class path.

View solution in original post

6 Replies

Avatar

Level 10

To connect to AEM from a Java client, you use JCR API. You need to include the Jackrabbit JARin your app class path as shown in the article. You can can create nodes, modify them, and so on via the JCR API.

Avatar

Level 10

If you do not add the correct Jackrabbit JAR into your class path, you will get an exception.

Avatar

Level 2

I am trying to connect AEM version 6.2 .

Which version of JCR and jackrabbit jar is preferable ?

JCR 2.0 and jackrabbit-standalone-2.6.5.jar ??

Avatar

Correct answer by
Level 10

I will test against AEM 6.2 and post back. But as I recall, you need to include the JAR in your apps class path for the connection to be successful. It will compile with POM dependency, but won't connect without adding JAR to class path.

Avatar

Level 2

It worked . i have added jackrabbit-standalone-2.6.5.jar into my classpath (web-int/lib) folder and now it's connecting .

Thanks Mac!!!