Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,335
Community Members
 
Community Events
165
Community Groups

I can't add dependencies to my Confluence plugin

Whenever I add a dependency to connect to databases to my Confluence plugin I get this exception:

org.osgi.framework.BundleException: Unable to resolve [...]: missing requirement [...] osgi.wiring.package; (osgi.wiring.package=com.mchange.v2.c3p0) Unresolved requirements: [...] osgi.wiring.package; (osgi.wiring.package=com.mchange.v2.c3p0)]

The dependency I'm trying to add is

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.48</version>
</dependency>

 

How can I fix this?

1 answer

0 votes
Tuncay Senturk Community Leader Apr 05, 2022

Hi @Mikel Rodriguez 

I exactly recall this problem in Jira plugins, and I know it's tough to solve. 

What I'd suggest is to add the <Import-Package> section into your <instructions> element under the pom configuration and make the relevant packages optional. Otherwise you need to add all related dependencies to your pom.xml

Here it seems that "com.mchange.v2.c3p0" package needs to be done optional but if you add this other packages might throw similar errors.

 

<Import-Package>
com.mchange.v2.c3p0;resolution:="optional",
*
</Import-Package>

 Hope it was helpful

Tuncay

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

270 views 2 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you