gpt4 book ai didi

java - AEM 6.1 扩展 ThumbnailProcess 工作流程步骤

转载 作者:太空宇宙 更新时间:2023-11-04 13:13:21 27 4
gpt4 key购买 nike

我正在尝试扩展 com.day.cq.dam.core.process.ThumbnailProcess 类。

我使用的是 Java JDK 1.8.0_65、Maven 3.0.5 和 Adob​​e AEM 6.1

当我编译代码时,出现此错误:

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.20.0:scr (generate-scr-descriptor) on project my.pack.common.PROCESS: Execution generate-scr-descriptor 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/dam/core/process/ThumbnailProcess, method: 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:/C:/Users/Dwecol/.m2/repository/org/apache/felix/maven-scr-plugin/1.20.0/maven-scr-plugin-1.20.0.jar

[ERROR] urls[1] = file:/C:/Users/Dwecol/.m2/repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar [ERROR] urls[2] = file:/C:/Users/Dwecol/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar [ERROR] urls[3] = file:/C:/Users/Dwecol/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar [ERROR] urls[4] = file:/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

[ERROR] urls[5] = file:/C:/Users/Dwecol/.m2/repository/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.jar [ERROR] urls[6] = file:/C:/Users/Dwecol/.m2/repository/org/osgi/org.osgi.core/4.2.0/org.osgi.core-4.2.0.jar

[ERROR] urls[7] = file:/C:/Users/Dwecol/.m2/repository/org/osgi/org.osgi.compendium/4.2.0/org.osgi.compendium-4.2.0.jar

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

[ERROR] urls[9] = file:/C:/Users/Dwecol/.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>mypro:my.pack.edidomus.common.PROCESS:1.0.1-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]] [ERROR] -> [Help 1] 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] 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

我的类(class)是这样的:

@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);
}

你有什么建议吗?

最佳答案

作为测试,您可以尝试 aem6 api 依赖项,而不是 6.1 uber jar。我的猜测是你正在扩展一个混淆的类。如果您能够通过 6.0 依赖项克服这个问题,那么您可以向 Adob​​e 索要未压缩的 6.1 jar

<depen­dency>
    <groupId>com.adobe.aem</groupId>
    <arti­fac­tId>aem-api</arti­fac­tId>
    <ver­sion>6.0.0.1</ver­sion>
    <scope>pro­vided</scope>
</depen­dency>

关于java - AEM 6.1 扩展 ThumbnailProcess 工作流程步骤,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33755333/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com