Unable to read classpath resource: OSGI-INF/com...... | Community
Skip to main content
Level 4
February 1, 2021
Question

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

  • February 1, 2021
  • 3 replies
  • 1994 views

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 - https://cqdump.wordpress.com/2019/01/14/writing-unit-tests-for-aem-part-2-maven-setup/

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 

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

3 replies

Kiran_Vedantam
Community Advisor
Community Advisor
February 1, 2021

Hi @shibani06,

 

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.

 

Thanks,

Kiran Vedantam 

SHIBANI06Author
Level 4
February 2, 2021

 

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

SHIBANI06Author
Level 4
February 2, 2021
Hi @kiran_vedantam, In addition to the above we are using AEM 6.4 and Java 1.8
Anudeep_Garnepudi
Community Advisor
Community Advisor
February 2, 2021
SHIBANI06Author
Level 4
February 2, 2021
Hi @anudeep_garnepudi, Will the junits work properly that have been written for both SCR and R6 annotations in the same project