Using the following dependencies (amongst others, the bundle is supposed to be installed to AEM 6.1)
runtime is java8
I get this exception
Caused by: org.apache.felix.scrplugin.SCRDescriptorException: Unable to scan class files: ... (Class file format probably not supported by ASM ?) at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:219) at org.apache.felix.scrplugin.helper.ClassScanner.process(ClassScanner.java:161) at org.apache.felix.scrplugin.helper.ClassScanner.scanSources(ClassScanner.java:146) at org.apache.felix.scrplugin.SCRDescriptorGenerator.execute(SCRDescriptorGenerator.java:146) at org.apache.felix.scrplugin.mojo.SCRDescriptorMojo.execute(SCRDescriptorMojo.java:221) ... 22 more
Caused by: java.lang.IllegalArgumentException at org.objectweb.asm.ClassReader.(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.apache.felix.scrplugin.helper.ClassScanner.processClass(ClassScanner.java:201)
The class in question does not contain any osgi annotations at all, but is merely imported in some other @Component annotated classes.
Did anyone encounter this and found a solution?
I ran into this issue today. This happens when you are running maven-scr-plugin with scanClasses=true option. Older versions of maven-scr-plugin cannot scan classfile generated by java8. you will have to either switch to a newer version of scr plugin (I upgraded to 1.22) or set you maven-compiler-plugin target config to 1.7
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With