5 Replies Latest reply on Nov 10, 2017 12:18 PM by Jörg Hoh

    Replication AgentFilter not found

    sivaprasadreddys Level 1

      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)

        • 1. Re: Replication AgentFilter not found
          smacdonald2008 Adobe Employee

          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.

          1 person found this helpful
          • 2. Re: Replication AgentFilter not found
            sivaprasadreddys Level 1

            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>

            • 3. Re: Replication AgentFilter not found
              kautuksahni Adobe Employee

              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

              • 4. Re: Replication AgentFilter not found
                sivaprasadreddys Level 1

                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

                • 5. Re: Replication AgentFilter not found
                  Jörg Hoh Adobe Employee

                  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.