Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Static weaving with Base Entity class in a seperate jar fails(Static weaving with Base class in a seperate jar fails)
Static weaving with Base Entity class in a seperate jar fails [message #1785202] Tue, 10 April 2018 18:18 Go to next message
ELUser Mising name is currently offline ELUser Mising nameFriend
Messages: 26
Registered: May 2013
Junior Member
I have my base Entity classes in a seperate jar.
The base entity classes are abstract and annotatted with @MappedSuperclass

In persistence.xml I have enabled weaving with the following entries -
<property name="eclipselink.weaving" value="static" />
<property name="eclipselink.weaving.mappedsuperclass" value="true" />

I get an error when the base classes in a different jar are used.
If the base classes are moved to the same project then it works.


https://bugs.eclipse.org/bugs/show_bug.cgi?id=466271
mentions that it is fixed in the 2.7.0-SNAPSHOT.

I am using 2.7.1 realeased version but it still fails.
Was this fix missed in 2.7.1 or am I doing something wrong?

the error I get is -
java.lang.NoSuchMethodError: com.it.jpa.sample.de.CustomerDE._persistence_checkFetchedForSet(Ljava/lang/String;)V

Thanks for the help.




[Updated on: Tue, 10 April 2018 18:23]

Report message to a moderator

Re: Static weaving with Base Entity class in a seperate jar fails [message #1785708 is a reply to message #1785202] Wed, 18 April 2018 16:26 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
Are you running static weaving on the base jar as well?
The bug referenced described a problem where weaving was run on the base classes, but because it didn't contain concrete entity classes, mappedSuperclasses were skipped and left unmodified.
Re: Static weaving with Base Entity class in a seperate jar fails [message #1786622 is a reply to message #1785708] Tue, 08 May 2018 16:25 Go to previous message
ELUser Mising name is currently offline ELUser Mising nameFriend
Messages: 26
Registered: May 2013
Junior Member
I ran the static weaving on the jar.
The base Entities in the jar are now weaved.
But now all the DEs in my project have compilation errors. The weaving task error out due to the compilation error

CityDE is not abstract and does not override abstract method _persistence_shallow_clone() in PersistenceObject
public class CityDE extends AppBaseAuditDE {

Thanks for the help.

Update -
I added the deafult overirde in my base class and then ran the weaving and lazy loading is working now.
My question is why is only this method missing and required an override?
Did I miss some configuration that would add this override?

My Entities are as follows -
My framework jar has two Base entities.
My application has two base entities that extend the framework base classes.
My application entities extend my application base classes.

The overide I added in my application base entities
@Override
public Object _persistence_shallow_clone() {
// TODO Auto-generated method stub
return null;
}

Thanks again.

[Updated on: Tue, 08 May 2018 18:33]

Report message to a moderator

Previous Topic:EclipseLink + Apache Derby
Next Topic:dynamic weaver use spring boot and mongodb weaver not happened
Goto Forum:
  


Current Time: Tue Apr 16 22:35:32 GMT 2024

Powered by FUDForum. Page generated in 2.10090 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top