Howdy --
I have some 3rd-party dependencies in my pom.xml which are packaged as OSGi bundles and listed in my atlassian-plugin.xml under the Import-Packages section (to allow runtime, reflective use of the classes in these packages, as otherwise only the classes from these bundles which are directly loaded are available). However, when I first try to invoke my plugin via "atlas-mvn jira:run", I receive a BundleException ("Unresolved constraint", claiming that that dependency is unavailable).
How can this be resolved in a way which allows reflective use?
Community moderators have prevented the ability to post new answers.
The inability to use classes reflectively at runtime is not a desired feature, but rather, a result of the wrong classloader being in use -- as detailed in a different question, Wrong BundleDelegatingClassLoader in use during plugin runtime.
Until this issue is resolved, calling Thread.currentThread().setContextClassLoader(this.class.getClassLoader()) serves as a workaround.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.