eclipselink dynamic weaving not working from remote computer [message #514179] |
Fri, 12 February 2010 12:29  |
Eclipse User |
|
|
|
Dear all,
I have troubles with dynamic weaving. In my entities I use manytoone lazy relations, so I need the dynamic weaving. My project is an enterprise application build with Netbeans 6.7.1, running on Glassfish 2.1.1, JDK6, Eclipselink 2.0.0. The project contains an ejb module and a swing client runned using java web start.
So to the problem:
Everything works great on localhost (client runned from netbeans or using JWS from browser). But when I run the client using JWS on another computer (tried Win7 and Ubuntu), entities which have manytoone lazy relations are returned to server empty - all attributes are null. They are loaded to client correctly, but by save, server receives empty entities... When I set the relation to EAGER, entities are returned (and saved) correctly.
I tried to set static weaving, but then my app throws nullpointer exceptions, when I try to load an manytoone lazy object.
Can anybody help me?
Thank you
Michael
|
|
|
Re: eclipselink dynamic weaving not working from remote computer [message #515692 is a reply to message #514179] |
Fri, 19 February 2010 14:31  |
Eclipse User |
|
|
|
Hello,
When using static weaving, the problem sounds like you are accessing an untriggered lazy relationship after serializing it. JPA does not allow this, as lazy relationships need to be accessed/triggered/fetched before serialization if the relationships are to be used after serialization. This is because a detached/serialized entity will no longer have access to its persistence context inorder to fetch the relationship. Could you be doing something similar when using dynamic weaving?
Best Regards,
Chris
|
|
|
Powered by
FUDForum. Page generated in 0.04361 seconds