Hi Marius, One thing to keep in mind is that FeatureServiceImpl was changed to be single-threaded in Karaf 4.0.6. If you are invoking it programmatically, you need to do feature installs in a separate thread (since the single thread will be tied up installing your PluginManager and it will deadlock). This sounds similar to the problem that you're having.
https://issues.apache.org/jira/browse/KARAF-3798 We ran into this in OpenNMS and used CompletableFuture as a workaround: https://github.com/OpenNMS/opennms/commit/5cbfaf5b4f455225184950b238ccdea5e94f744b Seth Leger The OpenNMS Group On 11/6/17 2:51 AM, Marius Dienel wrote: > Hey Guys, > > > we're having a problem with Karaf Version > 4.0.4. We are currently > using 4.0.9, but are thinking of upgrading to 4.0.10 soon. In our > application we have a lot of features. One of them installs a bundle > (PluginManager), which itself adds, installs and starts one or multiple > features on startup (plugins for our application). Users are able to > install the plugins via the GUI and the files (.jar) won't get deleted > after building karaf/assembly. > > For each of those features a feature repository is created, if there is > not already one from earlier startups. Everything works fine, if there > already is a feature repository, but after a new build, when the feature > repository does not exist anymore the installation of the features does > not work, which leads to the bundle (PluginManager) being stuck in > "GracePeriod"-status, for versions 4.0.5,4.0.6,4.0.7 or in > "Starting"-status for versions 4.0.8,4.0.9,4.0.10. Everything works as > expected with version 4.0.4. > > The workflow to install the features/plugins is following: > > FeatureService.addRepository(featureUri) --> > FeatureService.getRepository(symbolicName) --> Repository.getFeatures() > --> FeatureService.installFeatures(featureSet, options) > > After stepping over installFeatures in debug-mode the debugger is stuck > and I cannot continue. The biggest problem is that there is no error or > exception in karaf.log. Karaf is still starting correctly and everything > except the plugins part is usable. > > Using 4.1.X is not an option right now, since there are dependency > problems when upgrading. > > Thank you in advance for your help. > > Greetings Marius > > > > --------- > doubleSlash gehört zu "Deutschlands besten Arbeitgebern 2017" > <https://www.doubleslash.de/unternehmen/presse-uebersicht/pressemitteilungen/detail/dreifachauszeichnung-fuer-doubleslash-als-einer-der-besten-arbeitgeber/> > <http://blog.doubleslash.de/>------------------------------------------------------------------------------------------------------------------- > *Marius Dienel > *Auszubildender > doubleSlash Net-Business GmbH > Otto-Lilienthal-Str. 2 > D-88046 Friedrichshafen > > Fon: +49 7541 / 70078-211 > Fax: +49 7541 / 70078-111 > [email protected] > https://doubleSlash.de > <http://doubleslash.de/>------------------------------------------------------------------------------------------------------------------- > > doubleSlash Net-Business GmbH > Geschäftsführung: Konrad Krafft, Andreas Strobel > Sitz, Registergericht: Friedrichshafen, Amtsgericht Ulm HRB 631718 > -------------------------------------------------------------------------------------------------------------------
