Enabling weaving - problems and advice on migration [message #1863108] |
Tue, 16 January 2024 19:20 |
Sahar Rahmatian Messages: 2 Registered: December 2023 |
Junior Member |
|
|
Hi eclipse link team,
We have a enterprise monolith Java application with different modules using JPA/Eclipselink that we want to enable dynamic/static weaving for in order to enable lazy loading for OnetoOne and ManytoOne ORM's, however we have a set of problems. Below is the tech stack we are using,
Core Framework: Jave EE 9
Application Server: Payara 5.28.0
Database: MySQL 5.7 (Percona) with ProxySQL for Read/Write Splitting
Data Access Layer: JPA 2.2 with Eclipselink
We have updated persistence.xml files for all modules to below (for now we are trying dynamic weaving since static weaving has more issues):
<property name="eclipselink.weaving" value="true"/>
Problems:
1) MappedSuperclasses are not getting woven properly since we are seeing below error:
Exception while processing rest request. RootCause =NoSuchMethodError: 'void com.abc.abc.abc.Entity1._persistence_set_id(java.lang.Long)'
notes:
- Entity1 extends Entity2, Entity1 is in module A, and Entity2 is in module B. id(java.lang.Long) is a field in Entity2
- We do not want to change the packaging and move entities in the same module.
2) ManyToMany and OneToMany ORM's are eagerly loaded even though the default should be LAZY.
3) Unit tests/IT tests are picking up the persistence.xml files correctly because i see logging enabled/disabled when I change the configuration, however lazy loading is not getting applied.
Also please let me know if you provide any expert services to help out with this application change.
Thank you,
Sahar
[Updated on: Tue, 16 January 2024 19:29] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03174 seconds