Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337894

Summary: Static weaving fails for Entities that use an interface or mapped superclass as the type of an attribute and specify the actual type in the mapping
Product: z_Archived Reporter: Yiping Zhao <yiping.zhao>
Component: EclipselinkAssignee: Tom Ware <tom.ware>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.orm-inbox, tom.ware
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed fix
none
proposed fix - updated for feedback none

Description Yiping Zhao CLA 2011-02-22 15:23:16 EST
Two tests newly added by Tom and one existing test failed with static weaving option with following error message since 20110218-r8989 for main:

testMultipleIdButNonIdClassEntity(), testRelatedBylawWrite() and testInterfaceBylawWrite() in org.eclipse.persistence.testing.tests.jpa.inherited.InheritedModelJunitTest failed with error:

An exception was caught during create operation: [Exception [EclipseLink-0] (Eclipse Persistence Services - 2.3.0.v20110218-r8989): org.eclipse.persistence.exceptions.DescriptorException Exception Description: An internal error occurred while accessing method [setReference] on class [class org.eclipse.persistence.testing.models.jpa.inherited.BuildingBylaw]. Internal Exception: java.lang.NoSuchMethodException: org.eclipse.persistence.testing.models.jpa.inherited.BuildingBylaw.setReference(org.eclipse.persistence.testing.models.jpa.inherited.BuildingBylaw) Descriptor: RelationalDescriptor(org.eclipse.persistence.testing.models.jpa.inherited.BuildingBylaw --> [DatabaseTable(JPA_BUILDING)])]
Comment 1 Tom Ware CLA 2011-02-22 15:30:03 EST
The fix for Bug 282523 did not cover static weaving and these tests are related to test model changes to test that bug.
Comment 2 Tom Ware CLA 2011-02-22 15:33:17 EST
Created attachment 189539 [details]
proposed fix
Comment 3 Tom Ware CLA 2011-02-22 15:34:50 EST
Previous code set the actual type on the weaved basic indirection policy at weaving time.  This change moves the detection to metadata processing that will be performed whether or not weaving is occuring.
Comment 4 Tom Ware CLA 2011-02-23 09:10:12 EST
Created attachment 189597 [details]
proposed fix - updated for feedback
Comment 5 Tom Ware CLA 2011-02-23 10:14:17 EST
Fix described above checked in to 2.1.x. 2.2.x and trunk.

Reviewed by Guy Pelletier

Tested with Static Weaving tests, Core LRG and JPA LRG
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:09:19 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink