|
|
|
|
| Re: java.lang.NoSuchMethodError: xxx._persistence_checkFetched(Ljava/lang/String;)V [message #714138 is a reply to message #714132] |
Tue, 09 August 2011 17:47  |
 |
Rolf Paulsen Messages: 14 Registered: June 2010 |
Junior Member |
|
|
A MappedSuperClass also does not get weaved (woven?) if there is no entity subclass present during weaving.
A MappedSuperClass is not ignored for weaving if itself and a subclass entity are in the persistence.xml during weaving because the MappedSuperClass gets marked for weaving only if it is found in the superclass hierarchy of an entity. So if you have your base classes in one jar/project and your entities in another jar/project and you compile the first jar on its own, you must have a dummy entity in the first jar to enable weaving of the MappedSuperClass; both must be in a "weaving only" persistence.xml.
[Updated on: Tue, 09 August 2011 17:52] Report message to a moderator
|
|
|
| (no subject) [message #714144 is a reply to message #701764] |
Tue, 09 August 2011 17:24  |
Scott Bishopp Messages: 2 Registered: August 2011 |
Junior Member |
|
|
I found the same issue. When the weaver detected a @MappedSuperclass in the hierarchy it simple stops weaving. Therefore objects under the Mappedsuperclass get ignored. I found this by by decompiling some of the weaved code.
When you have a MappedSuperClass you WILL NOT see the
"return super._persistence_get(s)" call.
public Object _persistence_get(String s)
{
if(s == "authorizationContexts")
return authorizationContexts;
if(s == "primarySecurityContext")
return primarySecurityContext;
if(s == "lastName")
return lastName;
if(s == "lastLogin")
return lastLogin;
if(s == "email")
return email;
if(s == "userId")
return userId;
if(s == "adminFlag")
return adminFlag;
if(s == "firstName")
return firstName;
if(s == "password")
return password;
else
return super._persistence_get(s);
}
|
|
|
| (no subject) [message #714145 is a reply to message #714132] |
Tue, 09 August 2011 17:47  |
 |
Rolf Paulsen Messages: 14 Registered: June 2010 |
Junior Member |
|
|
A MappedSuperClass also does not get weaved (woven?) if there is no entity subclass present during weaving.
A MappedSuperClass is not ignored for weaving if it and a subclass entity are in the persistence.xml during weaving. So if you have your MappedSuperClass without any subclassed entity in one jar/project and your entities in another jar/project and you compile the first project on its own, you must have a dummy "weaving helper" entity in the first jar to enable weaving of the MappedSuperClass. This dummy entity should be excluded from the first jar and the "real application" persistence.xml.
See http://www.eclipse.org/forums/index.php/t/175165/
[Updated on: Tue, 09 August 2011 18:18] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.01829 seconds