Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346535 - Invalid validation error for Converter when eclipselink-orm.xml is used
Summary: Invalid validation error for Converter when eclipselink-orm.xml is used
Status: VERIFIED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P1 major (vote)
Target Milestone: 3.0 RC3   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard: PMC_approved
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 16:20 EDT by Neil Hauge CLA
Modified: 2011-06-28 13:30 EDT (History)
4 users (show)

See Also:
david_williams: pmc_approved+
raghunathan.srinivasan: pmc_approved+
neil.hauge: pmc_approved? (naci.dai)
neil.hauge: pmc_approved? (deboer)
neil.hauge: pmc_approved? (neil.hauge)
neil.hauge: pmc_approved? (kaloyan)
neil.hauge: pmc_approved? (cbridgha)
neil.hauge: review+


Attachments
proposed patch (5.19 KB, patch)
2011-05-24 11:46 EDT, Paul Fullbright CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Hauge CLA 2011-05-19 16:20:07 EDT
Currently if you properly define a converter in a Java entity and then override that entity in eclipselink-orm.xml you will get the following invalid error message.

Duplicate converter "<name>" defined in this persistence unit

This is a regression that appears to have been introduced in RC1.
Comment 1 Neil Hauge CLA 2011-05-23 11:20:50 EDT
This bug is fixed by the patch posted in bug 346005 but we need a more isolated fix for the 3.0 release if possible.
Comment 2 Paul Fullbright CLA 2011-05-24 11:46:27 EDT
Created attachment 196456 [details]
proposed patch

Subset of other patch.  Changed isVirtual calculation for persistent attributes, and changed so converters are only built if the attribute is not virtual.
Comment 3 Neil Hauge CLA 2011-05-24 14:51:23 EDT
Patch looks good.  My testing has confirmed the fix and I haven't found any regressions.  Nan is also doing some testing.
Comment 4 Neil Hauge CLA 2011-05-24 17:44:15 EDT
    Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. 

This patch fixes 2 RC3 targeted bugs that are tied together.  The bug causes invalid Errors in the case of an EclipseLink mapping file override, and the other bug 346498 causes an NPE that causes validation to stop, resulting in non-reported real errors.

    Is there a work-around? If so, why do you believe the work-around is insufficient? 

No workaround, which is what makes this particularly onerous.

    How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? 

The fix has been tested by Paul, Nan, and myself.

    Give a brief technical overview. Who has reviewed this fix? 

See comment 2 for overview.  I have reviewed the fix.

    What is the risk associated with this fix? 

Low risk, isolated fix.  This is a greatly simplified and isolated fix from where we started (see bug 346005).  An effort was made here to fix this with the minimal possible change and risk.  It also takes out 2 RC3 targeted bugs.
Comment 5 Paul Fullbright CLA 2011-05-24 20:30:15 EDT
committed for rc3
Comment 6 Jolene Moffitt CLA 2011-06-28 13:30:59 EDT
Verified in Build I-3.3.0RC4-20110603221533

Verified you add converter type entity to EL orm mapping file and override the converter without error.  See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_RC3