我试图扩展 com.day.cq.dam.core.process.ThumbnailProcess 类。
我正在使用Java JDK 1.8.0_65,Maven 3.0.5和Adobe AEM 6.1
编译代码时出现此错误:
[错误]无法执行目标 org.apache.felix:maven-scr-plugin:1.20.0:scr(generate-scr-descriptor) 在项目my.pack.common.PROCESS:执行 生成目标的scr描述符 org.apache.felix:maven-scr-plugin:1.20.0:scr failed:API 执行时遇到不兼容问题 org.apache.felix:maven-scr-plugin:1.20.0:scr:java.lang.VerifyError: (class:com / day / cq / dam / core / process / ThumbnailProcess,方法: signature :()V)构造函数必须调用super()或this()
[ERROR] -------------------------------------------- ---------
[错误] realm = plugin> org.apache.felix:maven-scr-plugin:1.20.0 [ERROR]策略= org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] 网址[0] = 文件:/ C:/Users/Dwecol/.m2/repository/org/apache/felix/maven-scr-plugin/1.20.0/maven-scr-plugin-1.20.0.jar
[错误]网址[1] = 文件:/ C:/Users/Dwecol/.m2/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar [错误]网址[2] = 文件:/ C:/Users/Dwecol/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar [错误]网址[3] = 文件:/ C:/Users/Dwecol/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar [错误]网址[4] = 文件:/ C:/Users/Dwecol/.m2/repository/org/apache/felix/org.apache.felix.scr.generator/1.12.0/org.apache.felix.scr.generator-1.12.0.jar
[错误]网址[5] = 文件:/ C:/Users/Dwecol/.m2/repository/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.jar [错误]网址[6] = 文件:/ C:/Users/Dwecol/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar
[错误]网址[7] = 文件:/ C:/Users/Dwecol/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar
[错误]网址[8] = 文件:/ C:/Users/Dwecol/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[错误]网址[9] = 文件:/ C:/Users/Dwecol/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar [错误]外国进口数量:1 [错误]导入:输入[导入 从领域 ClassRealm [项目> mypro:my.pack.edidomus.common.PROCESS:1.0.1-快照 parent:ClassRealm [maven.api,parent:null]]] [错误] - > [帮助1]要查看错误的完整堆栈跟踪,请重新运行 使用-e开关的Maven。 [错误]使用-X开关重新运行Maven 启用完整调试日志记录 [错误]有关的更多信息 错误和可能的解决方案,请阅读以下文章: [错误] [帮助1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
我的班级正在这样下去:
@Component
@Service
@Properties({
@Property(name = Constants.SERVICE_DESCRIPTION, value ="MyThumbnailProcess"),
@Property(name = Constants.SERVICE_VENDOR, value = "Me"),
@Property(name = "process.label", value = "My Thumbnail Proc2")}
public class MyThumbnailProc extends ThumbnailProcess {
public MyThumbnailProc(){super();}
@Override
public void execute(WorkItem workItem, WorkflowSession workflowSession, MetaDataMap metaData) throws WorkflowException {
//do stuff -> create newMetaDataMap
super.execute(workItem, workflowSession, newMetaDataMap);
}
你有什么建议吗?
答案 0 :(得分:0)
就像测试一样,你可以尝试aem6 api依赖而不是6.1 uber jar。我的猜测是你正在扩展一个混淆的类。如果你能够通过6.0依赖关系来解决这个问题,那么你可以向Adobe询问未被发现的6.1 jar
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-api</artifactId>
<version>6.0.0.1</version>
<scope>provided</scope>
</dependency>
答案 1 :(得分:0)
这可能与uber.jar有关,你可能需要未经过混淆的jar版本。如果你无法解决这个问题,你应该提前托管日托。