Hi there,
I am in the process of migrating my JIRA add-on to JIRA 7.x
However I am facing weird issues, one of them is as below:
[INFO] [talledLocalContainer] Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.mycompany.helloworld [192]: Unable to resolve 192.0: missing requirement [192.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.spring.scanner.annotation.export)
Any comments?
Thanks
I added following Import-Package
lines to pom.xml. Saved my life
<Import-Package> javax.ws.rs*;version="[1,2)", javax.servlet*;version="2.5", javax.xml.bind*;version="[2.1,3)", *;version="0";resolution:=optional </Import-Package>
I am also getting this error Getting Unresolved constraint in bundle Unable to resolve 178.0: missing requirement [178.0] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.activeobjects.external)(version>=0.23.0)(!(version>=1.0.0))) while compiling the plugin on JIRA-7 I tried the above solution but it is generating IDE error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Tuncay Senturk [Snapbytes] - How did you figure out which packages to add to the Import-Package definition?
com.atlassian.plugin.spring.scanner.annotation.export seems very unrelated to the packages that you ended up adding.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It has been while and I do not remember all steps. I'm not sure but the last line (including star) might do the trick.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
importing the packages has worked for me as well
although the web item does not show so i need to investigate further
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
any working tutorial for JIRA gadget plugin with rest api with sdk 6.2.2 and jdk 8?...thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
I had
*;resolution:=optional without
*;version="0" and was getting
Unable to resolve 229.0: missing requirement [229.0] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.activeobjects.external)(version>=1.1.0)(!(version>=2.0.0)))
when reloading the addon through fastdev. Adding *;version="0" resolved the problem:
<Import-Package> // my imports... *;version="0";resolution:=optional </Import-Package>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works for me, thanks.
What I met was :
missing requirement [183.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.plugin.spring.scanner.annotation.component
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, that worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does anyone understand what kind of change are we making here? If yes, please share.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unless you plan to list every single package your plugin needs, be sure to add the
*;resolution:=optional
value to your list of packages, when including bundle instructions in your pluginatlassian-plugin.xml
XML.The
*;resolution:=optional
value instructs the plugin system to continue to scan your classes for packages, but to resolve all packages optionally. This means if you bundle a library that has code that depends on other libraries you do not need, the resolution will not fail.If, however, you are sure your code only refers to packages you need, you can omit the
;resolution:=optional
string. The advantage here is that you will be notified on installation if required dependencies are missing.
Source: https://developer.atlassian.com/server/framework/atlassian-sdk/marking-packages-as-optional-imports/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Got this when following the JIRA plugin tutorial (https://developer.atlassian.com/docs/getting-started/set-up-the-atlassian-plugin-sdk-and-build-a-project/put-the-final-polish-on-the-project-in-eclipse). Nice introduction to JIRA plugin development ......
edit
Note to self or others who run into this: delete the target directory under your helloWorld plugin project, and it works fine again (just takes a long time to repopulate target).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Delete the target directory saved my day.
Thanks Koen !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
THis may work for helloworld, and initially for the MyPluginServlet part of the tutorial, but it fails when you try to run the servlet. I would be ashamed of my work if I was tasked with writing this plugin documentation!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have found a solution in https://bitbucket.org/atlassian/atlassian-spring-scanner.
In the dependencies section, make sure that the scope of the following is provided.
<dependency> <groupId>com.atlassian.plugin</groupId> <artifactId>atlassian-spring-scanner-annotation</artifactId> <version>${atlassian.spring.scanner.version}</version> <scope>provided</scope> </dependency>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, this saved me big time. I forgot the concept of maven dependency mechanism and I spent almost like 1 hour to fix this problem and suddenly I saw this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try
atlas-mvn clean
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Doesn't help me. This command just delete "target" folder.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It helps every single time here, especially when upgrading sdk/amps or dependencies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Helped me too with an "Unable to resolve 161.0: missing requirement ..." OSGI error.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just realized when that happens!
It happens after using "Remote Debugging" via e.g. eclipse in conjunction with atlas-debug, but it's not atlas-debug itself, it's only after actually debugging via eclipse.
After that, the project doesn't start again because of unresolved constraints and has to be cleaned.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nabil Sayegh I didn't debug my project in eclipse but I had this error.
Finally I solved this problem by adding <scope>provided</scope> to my dependencies.
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.
@Roman Samorodov Thank you!!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing the same error, missing package com.atlassian.plugin.spring.scanner.annotation.export. It is really funny since I have checked over and over again that it is correctly declared as a dependency on the project's pom.xml and that it has been correctly downloaded to the project's local repository.
Anyone could help me? Since JIRA 7 appeared, add-on development is a hell. Instead of JIRA showing normal errors that can be fixed by the add-on developer, it seems that it "invents" senseless errors that are not related to anything that could be happening actually.
;version="0";resolution:=optional
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add-on development is a hell...True true/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the same within a Confluence Space Blueprint with the latest SDK.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.