Community
Participate
Working Groups
I found a curious bug with e4, gemini jpa and OSGi "require bundle - optional". My database (hsql) throws an exception, which I wasn't able to see at first (see http://www.eclipse.org/forums/index.php/m/800276/). It was an "DefClassNotFound" Exception, because I use "require bundle" with the additional "optional" field. I try to figure out a smaller use case than mine. BuildID: I20120127-1145 cheers, Muki
So it works with Eclipse 3.8?
And, are you aware, for Juno (3.8 and 4.2) we are changing so that optional dependencies are (normally) not installed greedily, like they used to be. See bug 247099 and the p2 Publisher wiki [1] for some history and details on this issue of greedy vs. non-greedy requirements. In short, if you need it, you should include it in a feature. [1] http://wiki.eclipse.org/Equinox/p2/Publisher Or ... could be something else ... just thought it might be related.
I will try to reproduce the error with 3.8. Currently I'm only use 4.2M5. I had a look at http://wiki.eclipse.org/Equinox/p2/Publisher , but I don't think it has to do with p2 as this for bundle installation. All my bundles are already in the launch configuration and ACTIVE.
I could not reproduce the error in a small example with 4.2M5 nor with 3.8M1. I will try to figure out if this is related to EclipseLink or Eclipse Gemini JPA. sorry for the inconvenience.
(In reply to comment #4) > I could not reproduce the error in a small example with 4.2M5 nor with 3.8M1. I > will try to figure out if this is related to EclipseLink or Eclipse Gemini JPA. > > sorry for the inconvenience. Should I close this bug and you can reopen if you have more details? At this point I am not sure what the issue is. If you can reproduce it again then I suggest trying to refresh the bundle in question and see if it gets wired to the optional requirement. (from an osgi> console prompt run the "refresh <bundle id>" command for the bundle ID that has the optional dependency.
Please mark this bug as closed. I will reopen it if I can reproduce the error correctly with a sample application.
(In reply to comment #6) > Please mark this bug as closed. I will reopen it if I can reproduce the error > correctly with a sample application. One thing that could be at play is the Export-Package "uses" directive. It could be that we are not able to find a consistent class space when we wire up the optional requirement. So instead of failing to resolve the bundle altogether we simply drop the optional import.