Rcp with eclipselink enable dynamic weaving

2019-08-08 12:58发布

问题:

I am using eclipselink in an rcp application, when for first time application uses the database i get these warning messages. Also the application lags for 1-2 seconds until jpa to login successfully. How to stop this warning, is this warning lags the application?

[EL Info]: 2012-05-08 12:28:31.186--ServerSession(981252826)--EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
[EL Warning]: 2012-05-08 12:28:31.774--ServerSession(981252826)--Reverting the lazy setting on the OneToOne or ManyToOne attribute x for the entity class [class y] since weaving was not enabled or did not occur.
[EL Warning]: 2012-05-08 12:28:31.775--ServerSession(981252826)--Reverting the lazy setting on the OneToOne or ManyToOne attribute xx for the entity class [class yy] since weaving was not enabled or did not occur.
[EL Warning]: 2012-05-08 12:28:31.775--ServerSession(981252826)--Reverting the lazy setting on the OneToOne or ManyToOne attribute xxx for the entity class [class yyy] since weaving was not enabled or did not occur.
[EL Info]: 2012-05-08 12:28:31.969--ServerSession(981252826)--bundleresource://46.fwk1596783631:2_Management login successful

回答1:

Maybe it's too late for an answer but it's related to ManyToOne or OneToOne relations and LAZY loading. You probably use it and for this, eclipselink must weave the bytecode(the .class files). If eclipselink doesn't manage to weave the code (for some reasons) then it cannot use LAZY loading....so maybe this is the cause of the lag in your application(if is not LAZY then is EAGER loading and this may require some extra time until fetches data from DB).