Hello, We are using Aries JPA 2.7.0 with eclipselink on Karaf 4.1.7 , and H2 database 1.3.72 in our application. We use declarative services.
We have separate databases db1 and db2, and db1 has two schemas schema1, schema2, and db2 has just one schema. We have separate persistent units (bundles) for each schema. When we deploy this for the first time we observed that we are not able to get JPATemplate service for db1, but for db2 the service is working fine. This occurs frequently i.e. if we deploy this for the first time, out of 10 times we are able to reproduce the issue 5 times. We have to clear Karaf cache and start our application until the JPATemplate service is available. We tried debugging the issue, but it seems to work fine when we debug, even if have not cleared Karaf data cache. i.e we reproduce the issue , retart our app in debugging mode. Normally the issue isn’t cleared until we clear the data cache. Could any one give pointers on how to identify the root cause. On enabling logging for Eclipselink. observed that after this message in log “*End predeploying Persistence Unit*” we observed that it logs “*Begin undeploying Persistence Unit*” when the JPATemplate service is not available. For the db2 schema which works fine we see that “*Begin deploying Persistence Unit*”. Thanks & Regards, Dheeraj