AEM 6.5.2 compilation errors with JDK 11 | Community
Skip to main content
October 18, 2019
Solved

AEM 6.5.2 compilation errors with JDK 11

  • October 18, 2019
  • 3 replies
  • 4226 views

Hi -

We are getting Code compilation errors as Failed to execute goal org.apache.felix:maven-scr-plugin:1.25.0:scr (generate-scr-scrdescriptor)

when we compile our code with JDK 11 for AEM 6.5.2 upgrade.

If anybody faced same problem and resolved it or have any idea of resolution, would be helpful.

[ERROR] Failed to execute goal org.apache.felix:maven-scr-plugin:1.25.0:scr (generate-scr-scrdescriptor) on project <????>

(Class file format probably not supported by ASM ?): Ille

galArgumentException -> [Help 1]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

From what I see, the latest version of the maven-scr-plugin should support Java 11.

3 replies

sunjot16
Adobe Employee
Adobe Employee
October 18, 2019

Could you please verify whether the source and the target compilers are using jdk11 or auto setting, in your IDE and also that the machine shows the latest version of Java (11) as installed by checking the java version on it?

In AEM, you can check & set the compilers by following the below steps:

In http://<host>:<port>/system/console/configMgr, open Apache Sling Java Script Handler, and set Source & Target VMs to auto or to some jdk 11 version.

Hope it helps.

sunjot16
Adobe Employee
Adobe Employee
October 25, 2019

This issue seems to be coming from the maven-scr-plugin. By moving to Java 11, the class files that you create will be compiled to Java 11 byte code. The maven-scr-plugin then has to scan this byte code to find the annotations that are applied to it. You may need to find the maven-scr-plugin that supports Java 11.

I found a few relevant links that contain the hotfixes/workarounds and could be helpful:

* https://github.com/headwirecom/aem-ide-tooling-4-intellij/issues/20

* https://stackoverflow.com/questions/53086179/maven-src-plugin-java-11-unable-to-scan-class-files

* https://wso2.org/jira/browse/CARBON-15369

I also found out that the latest version of maven-scr-plugin is 1.26.2. It could be possible that this latest version of the plugin has support for Java 11.

Maven Repository: org.apache.felix » maven-scr-plugin » 1.26.2

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
October 26, 2019

From what I see, the latest version of the maven-scr-plugin should support Java 11.