Community
Participate
Working Groups
This affects the loading of persistence.xml files from bundles that are in the ACTIVE state preventing persistence units being registered by GeminiOSGiInitializer.registerBundle(). Tested with gemini JPA 1.0.0M3 under Felix 3.0.6. The BundleProxyClassLoader.findResources(String name) (and getResource()) method only looks at bundles in the INSTALLED and UNINSTALLED states. Shouldn't it be looking at ACTIVE bundles rather than UNINSTALLED. Changing UNINSTALLED to ACTIVE seems to fix it and allows the persistence units to register and function correctly.
This is actually a problem that is a result of a bug in Felix. Gemini JPA refreshes persistence unit bundles that have already been installed before gemini was active, and then waits for the UNRESOLVED event to do its work in the pre-resolve stage. Felix has a bug in that it does not fire the UNRESOLVED event (see https://issues.apache.org/jira/browse/FELIX-2456), which causes Gemini to not find the bundle. Unfortunately, adding the processing to the ACTIVE state is going to be too late to do the weaving, but might work if you do not do any weaving.
Moving to new bin location.
The bug in Felix that causes this has been fixed in the latest Felix SNAPSHOTS and will be included in the next release.
*** Bug 331901 has been marked as a duplicate of this bug. ***