| Summary: | Exception thrown when JPA version is 2.0 but ORM version is 1.0 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] Dali JPA Tools | Reporter: | Pascal Filion <pascal.filion> | ||||
| Component: | General | Assignee: | Brian Vosburgh <brian.vosburgh> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P2 | CC: | jolene.moffitt, neil.hauge, raghunathan.srinivasan | ||||
| Version: | unspecified | Flags: | neil.hauge:
pmc_approved?
(david_williams) 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+ |
||||
| Target Milestone: | 3.0 RC2 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | PMC_approved | ||||||
| Attachments: |
|
||||||
|
Description
Pascal Filion
This appears to be a regression. Investigating. Created attachment 195874 [details]
patch 1
Two main changes:
1. Check whether the orm.xml file is version 2.0 (instead of checking whether the project is JPA 2.0) before casting to an orm.xml 2.0 factory.
2. Cache the definition that supplies the orm.xml factory in the OrmXml context model object so it does not change unexpectedly (as opposed to searching for the definition *every* time it is needed).
3. Add check for change in file version (for both persistence.xml and orm.xml) to "sync with resource model". (This check used to only happen during "update"; but the version can be easily changed via the editor, which will trigger a "sync".)
Patch code looks good. No problems found with ad-hoc testing. Also fixes bug 339399 as expected. 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 is a major regression in functionality where 1.0 standard mapping files will no longer function in a JPA 2.0 faceted project. This prevents a user who is migrating from JPA 1.0 to 2.0 to gradually move mapping files up to 2.0 level, if they choose to do so at all.
Is there a work-around? If so, why do you believe the work-around is insufficient?
There is no workaround except for the user to change the version of the mapping file from 1.0 to 2.0, which may not be reasonable to do.
How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?
Brian and I have tested this fix manually, in addition to the running the extensive Dali JUnit test suite.
Give a brief technical overview. Who has reviewed this fix?
See comment #2 for technical overview. I have reviewed the fix.
What is the risk associated with this fix?
Low-medium, but I think more on the low side.
Patch checked into HEAD for RC1. Verified in Build I-3.3.0RC4-20110603221533 Verified no errors appear in error log when you change the version value in the orm.xml source. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_RC2 Verified in Build I-3.3.0RC4-20110603221533 Verified warning appears correctly if using EL platform and no warning appears if using Generic platform. see the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0_RC2 |