Connecting AEM server remotely from the external java web application. | Community
Skip to main content
Arun_Chola
October 31, 2017
Solved

Connecting AEM server remotely from the external java web application.

  • October 31, 2017
  • 6 replies
  • 2914 views

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 the JCR API

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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.

6 replies

smacdonald2008
October 31, 2017

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.

smacdonald2008
October 31, 2017

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

Arun_Chola
October 31, 2017

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 ??

smacdonald2008
smacdonald2008Accepted solution
October 31, 2017

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.

Arun_Chola
October 31, 2017

okie.. i will try that too.

Arun_Chola
October 31, 2017

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!!!