Expand my Community achievements bar.

SOLVED

custom liveaction implementation using BaseAction and BaseActionFactory

Avatar

Level 4

Hi,

I am trying to implement custom liveaction as per the steps mentioned in http://suryakand-shinde.blogspot.com/2015/01/custom-synchronisation-or-rollout.html article. when i run mvn, build fails miserably with following exception. i've referred some of forum discussion but not much useful in resolving this aspect. any pointers will be really helpful

INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 3.473 s

[INFO] Finished at: 2016-10-31T18:38:09-07:00

[INFO] Final Memory: 42M/385M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-scrdescriptor) on project legal.core: Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.20.0:scr failed: An API incompatibility was encountered while executing org.apache.felix:maven-scr-plugin:1.20.0:scr: java.lang.VerifyError: (class: com/day/cq/wcm/msm/commons/BaseActionFactory, method: <init> signature: ()V) Constructor must call super() or this()

[ERROR] -----------------------------------------------------

[ERROR] realm =    plugin>org.apache.felix:maven-scr-plugin:1.20.0

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/Users/mohan_basavarajappa/.m2/repository/org/apache/felix/maven-scr-plugin/1.20.0/maven-scr-plugin-1.20.0.jar

[ERROR] urls[1] = file:/Users/mohan_basavarajappa/.m2/repository/org/slf4j/slf4j-simple/1.5.11/slf4j-simple-1.5.11.jar

[ERROR] urls[2] = file:/Users/mohan_basavarajappa/.m2/repository/org/slf4j/slf4j-api/1.5.11/slf4j-api-1.5.11.jar

[ERROR] urls[3] = file:/Users/mohan_basavarajappa/.m2/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar

[ERROR] urls[4] = file:/Users/mohan_basavarajappa/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar

[ERROR] urls[5] = file:/Users/mohan_basavarajappa/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar

[ERROR] urls[6] = file:/Users/mohan_basavarajappa/.m2/repository/org/apache/felix/org.apache.felix.scr.generator/1.12.0/org.apache.felix.scr.generator-1.12.0.jar

[ERROR] urls[7] = file:/Users/mohan_basavarajappa/.m2/repository/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.jar

[ERROR] urls[8] = file:/Users/mohan_basavarajappa/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar

[ERROR] urls[9] = file:/Users/mohan_basavarajappa/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar

[ERROR] urls[10] = file:/Users/mohan_basavarajappa/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar

[ERROR] urls[11] = file:/Users/mohan_basavarajappa/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar

[ERROR] Number of foreign imports: 1

[ERROR] import: Entry[import  from realm ClassRealm[project>com.apple.cmscoe:legal.core:0.0.1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]

[ERROR] 

[ERROR] -----------------------------------------------------

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

[ERROR] 

[ERROR] After correcting the problems, you can resume the build with the command

[ERROR]   mvn <goals> -rf :legal.core

1 Accepted Solution

Avatar

Correct answer by
Level 4

I am able to resolve this exception during maven build by explicit manual addition of cq-msm-commons jar file to (local) maven repository. You can download this jar from AEM environment and add it to your maven repository using command mentioned below.

mvn install:install-file -DgroupId=com.day.cq.wcm -DartifactId=cq-msm-commons -Dversion=1.1.2 -Dpackaging=jar -Dfile=<jar file location>

after adding this jar to your maven repo, mvn build and package installation will work as expected.

View solution in original post

12 Replies

Avatar

Administrator

Please have a look at these links:- 

Link:- http://labs.6dglobal.com/blog/2015-09-14/felix-scr-plugin-compatibility-chart/

// It talks about  the compatible versions of the Apache Felix SCR Annotations and Apache Felix Maven SCR Plugin:

                                                                                                                                                                                                                                                                                                                                                                                                               
 maven-scr-plugin Versions
org.apache.felix.scr.annotations Versions 1.21.01.20.01.19.01.17.01.16.01.15.01.14.01.13.01.12.01.11.01.10.01.9.01.8.01.7.41.7.21.7.01.6.01.4.41.4.21.4.0
1.9.12TTTTTTTTTTFTTFFFFTTF
1.9.10TTTTTTTTTTFTTFFFFTTF
1.9.8TTTTTTFTTTFTTFFFFTTF
1.9.6TTTTTTTTTTFTTFFFFTTF
1.9.4TTTTTTTTTTFTTFFFFTTF
1.9.2TTTTTTTTTTFTTFFFFTTF
1.9.0TFTTTTTTTTFTTFFFFTTF
1.8.0FFFFFFFFFFFTTFFFFTTF
1.7.0FFFFFFFFFFFTTFFFFTTF
1.6.0FFFFFFFFFFFFFTTFFTTF
1.5.0FFFFFFFFFFFFFFFFFTTF
1.4.0FFFFFFFFFFFFFFFTTTTF
1.3.0FFFFFFFFFFFFFFFFFTTF
1.2.0FFFFFFFFFFFFFFFFFTTF
1.0.0FFFFFFFFFFFFFFFFFTTF
0.9.0FFFFFFFFFFFFFFFFFTTF

Link:- https://github.com/Adobe-Consulting-Services/lazybones-aem-templates/issues/8

Link:- http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

I hope this would help you.

~kautuk



Kautuk Sahni

Avatar

Level 10

Have you tried using Maven Archetype 10 and AEM urber Jar? 

Avatar

Level 2

If you are getting this error with aem uber.jar, then you can try adding an explicit dependency for com.day.cq.wcm.cq-msm-commons

Avatar

Level 4

Yes. i am using archetype 10 and uber.jar. i get this error with the same. is there any example which i can reference? am not able to understand what's causing issue here

Avatar

Level 4

Hi

i added explicit dependency in my parent pom.xml and module specific pom, but i still see the same exception. i've used following dependency in pom.xml file

            <dependency>

                <groupId>com.day.cq.wcm</groupId>

                <artifactId>cq-msm-api</artifactId>

                <version>5.4.4</version>

                <scope>provided</scope>

            </dependency>

Avatar

Level 10

LIke i mentioned in the other thread - i am working on this. 

PS - please do not open duplicate threads - we typically will remove dup threads. 

Avatar

Level 10

The author of that article did not do any favors to the community by posting the code in the blog as an image and thereby forcing ppl to type all the code. First question is - are you sure you typed everything. 

Avatar

Level 4

Hi @smacdonald2008

They're NOT DUPLICATE issues. This thread is related to using BaseActionFactory, BaseAction, FilteredAction classes to create a custom live action. I am trying to implement as per steps mentioned in the artcile http://suryakand-shinde.blogspot.com/2015/01/custom-synchronisation-or-rollout.html 

When i try to build using mvn, i scr plugin error i've mentioned above. 

NOTE : not duplicate. separate threads are posted for 2 different implementation approaches

Avatar

Level 10

The code in that other blog seems to not work:

https://github.com/Adobe-Marketing-Cloud/experiencemanager-java-msmrollout/blob/master/MyLiveActionF...

This example works and compiles. 

The other blog is not an Adobe document - I recommend sending the author a message, 

Avatar

Correct answer by
Level 4

I am able to resolve this exception during maven build by explicit manual addition of cq-msm-commons jar file to (local) maven repository. You can download this jar from AEM environment and add it to your maven repository using command mentioned below.

mvn install:install-file -DgroupId=com.day.cq.wcm -DartifactId=cq-msm-commons -Dversion=1.1.2 -Dpackaging=jar -Dfile=<jar file location>

after adding this jar to your maven repo, mvn build and package installation will work as expected.

Avatar

Level 5

FYI - Since labs.6dgloba.com is down, here's a link to the same post about Felix SCR compatibility on my personal blog: https://www.danklco.com/posts/2015/09/14/felix-scr-plugin-compatibility-chart/