Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » How to use static weaving properly ?(I wove but the entities still eager loading)
How to use static weaving properly ? [message #632979] Thu, 14 October 2010 17:07 Go to next message
No real name is currently offline No real name
Messages: 7
Registered: April 2010
Junior Member
Hello all

I'm using eclipselink 2 in a Java SE environment (actually running in tomcat) and I'm trying to perform lazy loading. All relationships are marked with lazy.

I ran the static weaving in console mode (not with ant) and I believe all works fine. The log don't shows any error and when I run a simple test (load an Entity) I can see in the console:

property=eclipselink.weaving.lazy; default value=true
and
... registered to be processed by weaver

But the entities still loading eargerly! There are more steps that I need to do?

Thanks!!! and sorry for my poor English
Re: How to use static weaving properly ? [message #633624 is a reply to message #632979] Mon, 18 October 2010 11:00 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

The static weaver will output a weaved jar file, ensure that you use this file, and that the class sizes are different than the original.

Include, "eclipselink.weaving"="static" in your persistence.xml.

If still having issues include your persistence.xml, also set logging on finest when running the static weaver and ensure it is weaving your classes and no errors are occurring.

You may wish to try the ant task, if you cannot get the prompt working.


James : Wiki : Book : Blog : Twitter
Re: How to use static weaving properly ? [message #633630 is a reply to message #633624] Mon, 18 October 2010 11:21 Go to previous message
No real name is currently offline No real name
Messages: 7
Registered: April 2010
Junior Member
Hi James, thanks for the awser.

Today I found the error, I did a mistake. I create the project using the eclipse galileo wizard but this wizard is for jpa 1 (I'm using eclipselink 2). Then I changed the persistence tag in persistence.xml file and the weaving ran properly. Embarrassed

Now all is working fine
Previous Topic:C++ wth Msqyl-- dyld: Library not loaded: libmysqlcppconn.5.dylib.No image found
Next Topic:embedded object: field does not exist
Goto Forum:
  


Current Time: Thu Jul 31 19:55:00 EDT 2014

Powered by FUDForum. Page generated in 0.02402 seconds