BundleException when adding third party dependency Edited

When I add the following dependency to my pom.xml:

<dependency>
<groupId>org.apache.odftoolkit</groupId>
<artifactId>odfdom-java</artifactId>
<version>0.8.11-incubating</version>
<scope>compile</scope><!-- important! -->
</dependency>

I get the following error during atlas-run or atlas-package:

[INFO] [talledLocalContainer] 2017-08-04 16:33:59,885 ERROR [QuickReload - Plugin Installer] [plugin.osgi.factory.OsgiPlugin] enableInternal Detected an error (BundleException) enabling the plugin 'com.plugin.export.odt' : Unresolved constraint in bundle com.plugin.export.odt [258]: Unable to resolve 258.0: missing requirement [258.0] osgi.wiring.package; (osgi.wiring.package=com.hp.hpl.jena.query).  This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN

I know that my problem is related to this article, and there is another similar question on the form, however I can't seem to find the answer.

No OSGi bundle seems to be exporting the package for my plugin to consume it, according to the article referenced above I may need to provide it by packaging it within my plugin and removing the package import! but I can't begin to understand what this might mean?

What am I doing wrong? What are the steps to track the problem? Is this a dependency conflict or simply my dependency 

 

1 answer

Hi,

I would possibly look at the scope:

https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

 

Perhaps also investigate to see if there are any conflicts:

atlas-mvn dependency:tree

This will print a list with all the dependencies for your project.

If you do find a conflict, you can exclude the offending version from your pom with the <exclusions> tag.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,792 views 26 10
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you