Expand my Community achievements bar.

AEM IntelliJ Debug Error:osgi: [sourcedcode.core] Classes found in the wrong directory: {META-INF/versions/9/javax/xml/bind/ModuleUtil.class=javax.xml.bind.ModuleUtil} | AEM Community Blog Seeding

Avatar

Administrator

BlogImage.jpg

AEM IntelliJ Debug Error:osgi: [sourcedcode.core] Classes found in the wrong directory: {META-INF/ve... by SourceCode

Abstract

Writing unit tests for AEM Backend code on IntelliJ can sometimes be challenging; mocking objects, initializing OSGI components, etc… It’s most beneficial when we can write unit tests utilizing the JUnit debug feature on IntelliJ.

While trying to debug code in JUnit, I was getting an error of

1
Error:osgi: [sourcedcode.core] Classes found in the wrong directory: {META-INF/versions/9/javax/xml/bind/ModuleUtil.class=javax.xml.bind.ModuleUtil}
Digging through the internet, I have found a solution.

There’s a solution online, https://issues.apache.org/jira/browse/FELIX-5592

Personally, there’s a lot of conversation happening in the post, to offload the confusion for you, I will provide you instructions on how you can solve the problem here.

Step 1
From the core/pom.xml, find the plugin, groupId:org.apache.felix && artifactId:maven-bundle-plugin. Making sure you add _fixupmessages into the instructions XML configuration.

Your configuration should look like below. Add line:9, <_fixupmessages>”Classes found in the wrong directory”;is:=warning</_fixupmessages>




org.apache.felix
maven-bundle-plugin
true


<_fixupmessages>"Classes found in the wrong directory";is:=warning</_fixupmessages>
...

...

Read Full Blog

AEM IntelliJ Debug Error:osgi: [sourcedcode.core] Classes found in the wrong directory: {META-INF/ve...

Q&A

Please use this thread to ask the related questions.



Kautuk Sahni
0 Replies