Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Maven error in moving code from java 8 to 11 in AEM 6.5

Avatar

Avatar
Give Back 5
Level 2
shajiahmed
Level 2

Likes

5 likes

Total Posts

45 posts

Correct Reply

3 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile

Avatar
Give Back 5
Level 2
shajiahmed
Level 2

Likes

5 likes

Total Posts

45 posts

Correct Reply

3 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back
Ignite 5
Ignite 3
View profile
shajiahmed
Level 2

16-04-2021

I see this error moving from java 8 to 11 in AEM 6.5. Execution generate-scr-scrdescriptor of goal org.apache.felix:maven-scr-plugin:1.20.0:scr failed: org.apache.felix.scrplugin.annotations.AnnotationProcessor is not an ImageIO SPI class?

View Entire Topic

Avatar

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile

Avatar
Affirm 100
Level 10
asutosh_jena
Level 10

Likes

367 likes

Total Posts

462 posts

Correct Reply

134 solutions
Top badges earned
Affirm 100
Ignite 1
Establish
Give Back 50
Give Back 5
View profile
asutosh_jena
Level 10

16-04-2021

Hi @shajiahmed 

 

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.

 

Your current version of maven-scr-plugin (1.20.0) does not support on Java 11 and you will need to find the maven-scr-plugin that supports Java 11.

The latest maven-scr-plugin as of today is 1.26.4 and it could be possible that this latest version of the plugin has support for Java 11.

https://mvnrepository.com/artifact/org.apache.felix/maven-scr-plugin/1.26.4

 

The other option will be to start using the maven-bundle-plugin and the standard Declarative Services annotations instead of the Custom Felix annotations. Note that this would still involve updating those plugins to versions which can support Java 11. I personally using maven-bundle-plugin version 4.2.0 with Java 11 and it works perfectly fine.

 

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>4.2.0</version>
</plugin>

Note: This would still involve updating some of the plugins to versions which can support Java 11.

 

Hope this helps!

Thanks