Static weaving with Base Entity class in a seperate jar fails [message #1785202] |
Tue, 10 April 2018 18:18 |
ELUser Mising name 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 #1786622 is a reply to message #1785708] |
Tue, 08 May 2018 16:25 |
ELUser Mising name 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
|
|
|
Powered by
FUDForum. Page generated in 0.03743 seconds