[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Re: Equinox weaving configuration - Clasloading issue

Hi Thomas,

Thanks for clarifying your situation--you're on the right track. To enable weaving when launching inside PDE you need to specify the VM arg:

-Dosgi.framework.extensions=org.eclipse.persistence.jpa.equinox.weaving

as well as deploy the two weaving related fragments. I've done this to the "Developing with EclipseLink OSGi in PDE" [1] example and I can see weaving is working. You can check by seeing if an Entity implements the PersistenceWeaved marker interface. I added:

if (Helper.classImplementsInterface(Person.class, PersistenceWeaved.class)) {
System.err.println("Person Woven!");
} else {
System.err.println("Person NOT Woven!");
}


to the Activator after I create my EntityManagerFactory and in my console I see the "Person Woven!" message.

Can you try to get weaving working with the example? Your application is using a number of other technologies that might be the issue. What I've described should work in a "pure" OSGi Equinox app. I'm not sure what effect introducing Spring has. I don't think you are using Spring to create and inject your EntityManager so how it may be a red herring. I suggest getting the wiki example working, then a small example with your domain model, then your full app.

--Shaun

[1] http://wiki.eclipse.org/EclipseLink/Examples/OSGi/Developing_with_EclipseLink_OSGi_in_PDE