| [news.eclipse.rt.eclipselink] Re: Equinox weaving configuration - Clasloading issue |
And now with the attachements... Thomas Haskes schrieb: > Shaun Smith schrieb: >> Hi Thomas, >> >> I'll take a detailed look at your code but right away I can see you >> are not following the instructions. In the example, all the code is in >> single bundle with an Activator that implements >> org.osgi.framework.BundleActivator. Your version is using Eclipse >> classes. > > I missed to check the OSGi Target radio button in the new plugin wizard, > I see, but I let the activator implement the BundleActivator interface > instead of extending Plugin (which I thought is the only difference, but > it seems that it is not). Sorry. > > Anyway, I made some progress on the whle issue: > > First, I was able to get the example running, attached it as example1.zip. > > Second, I was able to reproduce the class loading error with that > example, it now behaves exactly as may application does. Attached it as > example2.zip. It would be nice if you could confirm this and tell me if > that behaviour is a bug, or just cannot work the way I'm using it. > > So here is what you need to do to (by using the examples it should be > just a matter of minutes): > > Optional: Unzip the example1.zip attachment and import the project > "hello.jpa" into a fresh workspace, create a launch configuration with > the two weaving related fragment and put the > > -Dosgi.framework.extensions=org.eclipse.persistence.jpa.equinox.weaving > > parameter into the vm args. See the "Person woven" message. This example > works. > > Next: delete the "hello.jpa" project from the workspace and import the > two projects "hello.jpa" (which is basically the same project as before, > except that the "class" child in the persistence.xml now points to > "hello.jpa.entities.Person" and that the "hello.jpa.entities package is > imported in the manifest.mf) and "hello.jpa.entities". This setup > reflects the one my application has, entities just reside in another bundle. > > Create a run configuration with everything neccessary for weaving again > (fragments vm arg etc. don't forget to deploy "hello.jpa.entities"). You > see that the hello.jpa bundle does not start automatically. If you start > form the console you get a classloading error "hello.jpa.entities not > found". Remove the two weaving related fragments from the run > configuration, leave evrything else as it is. Launch it and see the > example working (except weaving). The "Person NOT woven" message > appears, which is ok as the fragments are not deployed. > > That is exactly what happens in my app. > > Again, I'm sorry that I screwed to follow the example the first time, I > did not mean to waste your time with this. I hope you can reproduce the > behaviour I see here with the two examples, so we can make some progress . > > Thanks for all your effort from rainy Bochum, Germany, > > Tom >
Attachment:
example2.zip
Description: Binary data
Attachment:
example1.zip
Description: Binary data