I'm encountering the following plugin during testing for the latest release of Bamboo:
2013-09-26 13:36:08,598 ERROR [main] [OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.houghtonassociates.bamboo.plugins.gReview' : Constraint violation for package 'org.springframework.dao' when resolving module 66.0 between existing import 0.org.springframework.dao BLAMED ON [[66.0] package; (&(package=org.springframework.dao)(version>=0.0.0)(version<=0.0.0))] and uses constraint 4.0.org.springframework.dao BLAMED ON [[66.0] package; (package=hudson.model), [27.0] package; (package=org.springframework.dao)]. 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 http://confluence.atlassian.com/x/1xy6D
I'm trying to resolve the issue above, investigate it further. However, the link the error references is dead. Any idea what this is referring too?
Nevermind, i found the link:
https://jira.atlassian.com/browse/CONF-26094
The new link resides here:
https://developer.atlassian.com/display/DOCS/BundleException
As for the exception, I can't find this package anywere inmy plugin. Why am I getting this exception? I've read the doc and it still doesn't make sense. Here are my pom.xml and atlassian-plugin.xml:
https://github.com/onepremise/gReview/blob/master/pom.xml
https://github.com/onepremise/gReview/blob/master/src/main/resources/atlassian-plugin.xml
Community moderators have prevented the ability to post new answers.
Ok, finally, figured out the issue. I had the incorrect OSGI markup in my atlassian-plugin.xml. Here's what I had:
1
2
3
4
5
|
< bundle-instructions > < Import-Package >com.atlassian.bamboo.plugins.git;resolution:=optional;version="[1.8.26,1.9.9]"</ Import-Package > < Import-Package >com.sonyericsson.hudson.plugins.gerrit;resolution:=optional;version="[1.2.7,1.3.1]"</ Import-Package > < Import-Package >*;resolution:=optional</ Import-Package > </ bundle-instructions > |
Here's what the markup should be:
1
2
3
4
5
6
7
8
9
|
< bundle-instructions > < Import-Package > com.atlassian.bamboo.plugins.git;resolution:=optional;version="[1.8.26,2.5.8]", com.sonyericsson.hudson.plugins.gerrit;resolution:=optional;version="[1.2.7,1.5.2]", com.houghtonassociates.bamboo.plugins.view.*,com.atlassian.bamboo.ww2.actions.chains.*;resolution:=optional, com.atlassian.bamboo.webrepository.*,com.atlassian.bamboo.ww2.aware.*,org.apache.log4j;resolution:=optional, com.atlassian.bamboo.v2.build.repository.*;resolution:=optional </ Import-Package > </ bundle-instructions > |
There only needs to be one <import-package> element used. Separate entries by comma.
Good reference for details regarding importing and exporting packages:http://fusesource.com/docs/esb/4.4/esb_deploy_osgi/BestPractices-BuildBundles.html
Ok, finally, i found something on it:
https://jira.atlassian.com/browse/CONF-26094
The new link resides here:
https://developer.atlassian.com/display/DOCS/BundleException
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.