Replication AgentFilter not found

Avatar

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
sivaprasadreddy
Level 3

09-11-2017

Hi All,

I'm trying to replicate page programatically to the particular replication agent as mentioned [1].

[1]:CQ5.3: How to activate to a specific replication agent

When I build the bundle, bundle is in Active state, but I see below error in the log. Please advise if we need add any dependency for this issue.

ERROR:

(java.lang.NoClassDefFoundError: com/day/cq/replication/AgentFilter)

java.lang.NoClassDefFoundError: com/day/cq/replication/AgentFilter

        at java.lang.Class.getDeclaredMethods0(Native Method)

        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)

        at java.lang.Class.getDeclaredMethod(Class.java:2128)

        at org.apache.felix.scr.impl.inject.BaseMethod.getMethod(BaseMethod.java:318)

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,135 likes

Total Posts

3,167 posts

Correct reply

1,080 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,135 likes

Total Posts

3,167 posts

Correct reply

1,080 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

10-11-2017

The AgentFilter class should be part of the com.day.cq.cq-replication bundle, and on my local AEM 6.3 SP1 the system recommends to use this dependency:

<dependency>

  <groupId>com.adobe.granite</groupId>

  <artifactId>com.adobe.granite.replication.core</artifactId>

  <version>6.2.26</version>

  <scope>provided</scope>

</dependency>

Can you check on your instance (using localhost:4502/system/console/depfinder) what dependency is listed for this java package? If your bundle resolves, everything should fine, and there should never be a ClassNotFoundException.

Answers (4)

Answers (4)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

09-11-2017

That article is for AEM 5.x. How did you build your bundle - if using AEM 6.3 for example - did you use UBER 6.3 JAR?

This is a good use case for a HELPX article for use on latest AEM version. We do not have this documented in a community article.

Avatar

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
sivaprasadreddy
Level 3

10-11-2017

Hi Kautuk,

We are not implementing custom Replication Agent. My requirement is as follows:

We have different environments like dev, qa and prod. We have both author and publisher for each environment. We wanted to use workflow to promote documents from lower environment to higher like dev to qa and qa to prod.

When we use normal publish option it should deploy from author to publish only. but when we use workflow, it deploys from dev author to qa author and qa author to prod author etc..

So to meet this,

On Dev author, I've created replication agents for DEV publish and QA author. I will enable DEV publish agent and disable QA author agent so that when we use publish option, it will deploy documents from dev author to dev publish.

In the workflow process, I will get the QA author agents and deploy the document to QA author only.

This is what my approach.

To meet this, I'm writing custom code and getting issues as mentioned in my previous post.

your quick response would be more helpful.

Regards

Siva

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,201 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,201 likes

Total Posts

6,394 posts

Correct reply

1,147 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

09-11-2017

Try this community article:- AEM - How to create and implement custom Replication Agent

// The TransportHandler is used to transport the replication to the target and ContentBuilder assembles the data for the replication.

~kautuk

Avatar

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 3
sivaprasadreddy
Level 3

Likes

9 likes

Total Posts

92 posts

Correct reply

7 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
sivaprasadreddy
Level 3

09-11-2017

Thank you very much for your prompt response.

I've added below UBER 6.3 jar  dependency in pom.xml

<dependency>

<groupId>com.adobe.aem</groupId>

<artifactId>uber-jar</artifactId>

<version>6.3.0</version>

<classifier>apis</classifier>

<scope>provided</scope>

</dependency>

Please advise if i need to add any other dependency to use com.day.cq.replication.* classes..

I've tried by adding below dependency but it didn't worked.

<dependency>

<groupId>com.adobe.granite</groupId>

<artifactId>com.adobe.granite.replication.core</artifactId>

<version>5.12.10</version>

<scope>provided</scope>

</dependency>