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?
Hi @MÃkel RodrÃguez DomÃnguez
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
AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.