I'm building a plugin for Bitbucket Server 4.1.3 using the SDK 6.1.2 (tested with the same SDK version on Linux and Windows). My plugin uses autowiring for all services using the Atlassian Spring Scanner and that is generally working well. In development, I'm reloading after changes with Quick Reload (FastDev is disabled).
This usually goes well for a couple of hours, until suddenly during a plugin reload or a full atlas-run
startup:
[INFO] [talledLocalContainer] 2015-12-09 14:30:07,583 ERROR [spring-startup] c.a.p.o.f.OsgiPluginInstalledHelper Cannot determine required plugins, cannot resolve bundle 'com.example.myplugin' [INFO] [talledLocalContainer] 2015-12-09 14:30:14,671 ERROR [spring-startup] c.a.plugin.osgi.factory.OsgiPlugin Detected an error (BundleException) enabling the plugin 'com.example.my-plugin' : Unresolved constraint in bundle com.example.myplugin [114]: Unable to resolve 114.0: missing requirement [114.0] osgi.wiring.package; (&(osgi.wiring.package=com.atlassian.plugin.spring.scanner.annotation.imports)(version>=0.0.0)). 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 https://developer.atlassian.com/x/mQAN
(Full stacktrace here.)
Now I know this isn't the real cause, because if I stop the server, run atlas-mvn clean && atlas-run
, everything starts working fine again for a few hours. Even though I didn't change my code at all.
What could be triggering this? Can I troubleshoot this somehow to figure out why it can't resolve the Spring Scanner? Is there an easier way to fix this issue than rebuilding my entire test setup?
---
Research notes:
<Import-Package>
is mentioned but no clear explanation what the problem is and how that is supposed to solve it./bitbucket/plugins/servlet/upm/osgi
), I see no 'spring-scanner' anywhere. Neither when the plugin works, nor when the system is in the broken state.Community moderators have prevented the ability to post new answers.
In my cause, quickreload always fail to detect java code change, so I remove all compiled classes under target folder and run "atlas-package". This is faster than building from scratch.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.