I'm not sure if it's the case in Karaf, but isn't the "bundle cache" where Configuration Admin configurations are stored? I wouldn't delete the bundle cache unless you are prepared to recreate all the configurations that would be deleted each time.
Note that the "bundle cache" is also a persistence storage area for bundles. They are allowed to use this space to hold files that keep their state, which is how configuration admin works by default. And so when you delete the "bundle cache" you also delete configuration admin's persistent store, and all configurations. But there might also be other bundles that use this mechanism. I hope that helps, - Ray On Wed, Dec 19, 2018 at 6:44 AM Dheeraj Guntupalli <reindh...@gmail.com> wrote: > Hello All, > > We are using Karaf 4.1.7, aries-jpa 2.7.0, h2 db in our application. We > use multiple persistence units, multiple h2 db files within our > application. We observed that when we have multiple h2 db files, and when > we restart Karaf after deleting the bundle cache a couple or more times we > see this issue "Waiting for JpaTemplate". > > We are able to reproduce this issue frequently, and when this issue > occurs, the JPA Template services are missing in the OSGi service registry. > We feel it is related to bundle/service startup/registration timing. Once > the bundle cache is built and it works, it will also work on subsequent > startups as long as the bundle cache isn’t deleted. > > The persistence bundle creates the JpaTemplate service by providing the > persistence unit, but also consumes it in the DAO services. Possibly the > required waiting time before the input data sources become available can > trigger the issue. > > Has anyone faced this issue earlier, or could give any pointers on how > to resolve this. Please let us know if you need more info. > > > Thanks & regards, > > Dheeraj > -- *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> (@rotty3000) Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> (@Liferay) Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)