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 | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
January 12, 2022

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

  • January 12, 2022
  • 0 replies
  • 1137 views

BlogImage.jpg

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} 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/versions/9/javax/xml/bind/ModuleUtil.class=javax.xml.bind.ModuleUtil}

Q&A

Please use this thread to ask the related questions.

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