Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Weaving: Classloading issue w/ TempEquinoxEntityLoader

I've responded on the forum.

http://www.eclipse.org/forums/index.php?t=msg&goto=494329&S=f1a1e2a9325535a2594bcfe172be6133#msg_494329

    Shaun

Oliver Vesper wrote:
Hi all,

in my test-scenario my entities are woven if I put them all together into one bundle. But that's not what I want it to be in my existing RCP application. So what needs to be done to make this work? I tried a couple of things but they all failed. Here is what my scenario looks like:

Bundle A contains entity E1, the persistence.xml file and it creates an EMF during the bundle's start-method. Entity E1 is successfully woven. Furthermore I got a bundle B which contains entity E2. Bundle A imports the one and only package of B.

My failed attempts were having Bundle B be an ordinary bundle, be a fragment-bundle of A and also be a fragment-bundle of org.eclipse.persistence.jpa (with the latter one class E2 wasn't even tried to be loaded, with the both first approaches I get a ClassNotFoundException when trying to load class E2).

While debugging I realized that the EquinoxInitializer$TempEquinoxEntityLoader is being asked to load my entities (instead of my handed-in classloader which is saved in the realClassLoader variable). That loader makes a call to findLocalClass which in turn ends up in eclipse.osgi's ClasspathManager being unable to load my class E2.

I really hope someone can help me out with this one. Although I want to use the weaving in my RCP app in the long-run, here I am testing just with a small and simple OSGI runtime configuration.

I also posted this message to the EclipseLink forum, see [1].

Thx,
Oliver

[1] http://www.eclipse.org/forums/index.php?t=msg&th=156817&start=0&S=bb8e895d499524bbfed61ed3083f7545
  

--
Oracle
Shaun Smith | Principal Product Manager
Phone: +19055023094
Oracle Server Technologies, Oracle TopLink
ORACLE Canada | 110 Matheson Boulevard West, Suite 100, Mississauga, Ontario | L5R 3P4

Green Oracle Oracle is committed to developing practices and products that help protect the environment

Back to the top