Issue with load time weaving for eclipselink. Leading to reverting lazy loading and needing to implement FetchGroupTracker interface for FetchGroups

I am getting an exception occurring that seems to be related to weaving not occurring and it is causing some for of persistence conflict/error, which is indicating the following…

[EL Severe]: 2024-08-09 11:04:24.92–ServerSession(1698237763)–Exception [EclipseLink-0] (Eclipse Persistence Services – 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.IntegrityException
Descriptor Exceptions:

Exception [EclipseLink-199] (Eclipse Persistence Services – 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: In order to use Fetch Group, the domain class (class com.project.model.jpa.BoxerJPAImpl) has to implement FetchGroupTracker interface.
Descriptor: RelationalDescriptor(com.project.model.jpa.BoxerJPAImpl –> [DatabaseTable(BOXER)])

The Boxer entity/class is using the annotation @FetchGroups, and to my understanding, this requires weaving to have occurred and then you do not have to implement the FetchGroupTracker interface that is being indicated in the stack trace. When I implement the interface or remove the Fetchgroup annotation, I am able to launch.

But I also have a few error messages from Eclipse Link that appear before the exception that look like this

[EL Warning]: metadata: 2024-08-09 11:04:24.857–ServerSession(1698237763)–Reverting the lazy setting on the OneToOne or ManyToOne attribute [glove] for the entity class [class com.project.model.jpa.BoxerJPAImpl] since weaving was not enabled or did not occur.

So it seems like weaving did not occur or was not enabled so lazy settings are being reverted on OneToOne or ManyToOne attributes which then leads to the exception im getting about the FetchGroupTracker interface needing to be implement since no weaving happened. Now im new to weaving but to my understanding and what ive been able to find, we use Spring to enable load time weaving with the InstrumentationLoadTimeWeaver bean in our persistence.xml and in our VM options we also have a java agent pointing to the spring-instrument jar….which should enable weaving at load time?? At least to my understanding.

Here is the Bean in our xml

<context:load-time-weaver weaver-class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>

I have also tried enabling the eclipselink.weaving=true jpa property as well but this doesn’t seem to work as well.

Also further down the stack there is a few more lines that I think lead to a clue as to whats going on. Several beans are having a problem being created and they all have this kind of stack trace

Constructor threw exception; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services – 2.6.4.v20160829-44060b6): org.eclipse.persistence.exceptions.EntityManagerSetupException

Exception Description: Deployment of PersistenceUnit [persistenceUnit] failed. Close all factories for this PersistenceUnit.

I think some form of persistence error/conflict is happening behind the scenes that im having trouble identifying which is causing the entityManager not able to deploy due to the persistence unit failing. Sorry im kind of a newbie when it comes to eclipselink/JPA/Spring so I was just wondering if anyone had any ideas as to why im getting this exception and why weaving may not be occurring because ive tried for days to find an answer online and nothing is fixing the error.

Any help is appreciated 🙂

I have tried adding eclipselink weaving properties such as

eclipselink.weaving=true or eclipselink.weaving=static

Also since the exception indicated fetch groups, I tried

eclipselink.weaving.fetchgroups=true

Also tried adding the eclipselink.jar as another java agent because I read online that eclipselink requires that for weaving, but then I got an error about the class PersistenceUnitInfo not being present, although I can see it on the classpath.

I have tried different version of dependencies such as spring-instrument, eclipselink, aspectJ

Tried removing the loadTimeWeaving context bean from the Spring persistence.xml just to see if anything would happen and im still getting the same exception of weaving not occuring/enabled and needing to implement the FetchGroupTracker interface because of this, only when I remove the spring-instrument java agent does a new error occur. But this is essentially just stating it needs the java agent.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật