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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Unable to read classpath resource: OSGI-INF/com......


Level 2

While moving from SCR to R6 annotations, when I wrote juints for the newly developed OSGi component  using R6 annotations I faced the following error - "No OSGi SCR metadata found in classpath "

As a fix to this I have added a few dependencies as mentioned in this document -

Now my new juint test works well without any problem but the existing junits that have been written for classes that use SCR annotations I see the below error,

java.lang.RuntimeException: Unable to read classpath resource: OSGI-INF/com....

Any help would be highly appreciated 

2 Replies


Community Advisor



Please change the maven-scr-plugin to the latest version and try. If it still does not work, please share the complete log.


Hope this helps.



Kiran Vedantam 


Level 2
Hi @Kiran_Vedantam, In addition to the above we are using AEM 6.4 and Java 1.8


Level 2
Hi @Anudeep_Garnepudi, Will the junits work properly that have been written for both SCR and R6 annotations in the same project


Community Advisor
Should work. The link is to generation of SCR metadata for OSGi Declarative Service(R6/R7) annotations.