Hi: Thank you for the tip.
well, setting serviceRequirements=disable actually worked. Although I had to restart the instance after updating the configuration. Is this a recommended and safe approach for a production system? Regards, Kushal. On Thu, May 9, 2019 at 10:45 PM Christian Schneider <ch...@die-schneider.net> wrote: > I dont think this is a race condition. > > Is it possible that your bundle has a requirement for the service and that > pax-jdbc does not provide a suitable capability. > (As pax-jdbc creates the DataSources from config there is no way how it > could provide the capability). > > The reason why it might work with optional is that then there is no > mandatory requirement. > > Does it help when you set > serviceRequirements=default > in the file org.apache.karaf.features.cfg ? > > Christian > > Am Mi., 8. Mai 2019 um 23:00 Uhr schrieb Kushal Gautam < > kushal.gau...@gmail.com>: > >> Hi: >> >> I have a bundle that depends on two different data sources; and broker as >> well. >> >> The bundle starts properly if I copy the osgi bundle into deploy folder >> or install it using bundle:install <location>. Installing the bundle this >> way works perfectly fine without any glitch. >> >> Instead, I tried to install it as a feature as: >> >> <feature name="stats-mbean" description="Stats MBEAN" version="1.0.0"> >> <bundle>file:D:/temp/stats-mbean-1.0.0.jar</bundle> >> </feature> >> >> >> I have created the datasources from "etc/org.ops4j.datasource-*.cfg" >> config files. >> >> I have included the feature, and when I try to install the feature, I get >> the following error. >> >> [caused by: Unable to resolve stats-mbean/1.0.0: missing requirement [ >> stats-mbean/1.0.0] osgi.service; effective:=active; filter:= >> "(&(objectClass=javax.sql.DataSource)(osgi.jndi.service.name >> =dw-datasource))"]] >> >> >> >> >> I have referenced the datasource in my bundle's blueprint as: >> >> <reference id="dw" interface="javax.sql.DataSource" filter="( >> osgi.jndi.service.name=dw-datasource)" /> >> >> >> >> I have tried several stuffs, but I am unable to resolve this issue. >> Strange thing is, I am able to start the same bundle if I install it >> manually (copy to deploy folder or bundle:install).. >> >> I am not entirely sure if this is an issue of pax-jdbc. If so, do I need >> to handle such cases specifically in the bundle pom or feature >> configuration? >> >> Any insights on this would be very helpful. >> >> Regards, >> Kushal. >> >> -- >> -- >> ------------------ >> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com >> >> --- >> You received this message because you are subscribed to the Google Groups >> "OPS4J" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to ops4j+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com >> <https://groups.google.com/d/msgid/ops4j/9af972cd-1d8d-42ec-9506-889d417e6c5c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > -- > -- > Christian Schneider > http://www.liquid-reality.de > > Computer Scientist > http://www.adobe.com > > -- > -- > ------------------ > OPS4J - http://www.ops4j.org - ops4j@googlegroups.com > > --- > You received this message because you are subscribed to the Google Groups > "OPS4J" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to ops4j+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ops4j/CAH6_LNnsG4DM7Ux5gJE%3DA8cSu0XN%3DQS6wCSyK-fUi77hQi4%2BnQ%40mail.gmail.com > <https://groups.google.com/d/msgid/ops4j/CAH6_LNnsG4DM7Ux5gJE%3DA8cSu0XN%3DQS6wCSyK-fUi77hQi4%2BnQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- -- ------------------ OPS4J - http://www.ops4j.org - ops4j@googlegroups.com --- You received this message because you are subscribed to the Google Groups "OPS4J" group. To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAGv3bDfMpPyGXaiBt%2BzFOjCeqfJH1MJWq%3D-4Lu5w3cj0_%2BsBsw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.