Bug 295842 - JPA tests: Make database platform and weaving properties explicit in persistence.xml
Summary: JPA tests: Make database platform and weaving properties explicit in persiste...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2009-11-23 05:37 EST by Sabine Heider CLA
Modified: 2022-06-09 10:33 EDT (History)
3 users (show)

See Also:


Attachments
Patch containing explicit settings for eclipselink.target-database and eclipselink.weaving (10.15 KB, patch)
2009-11-23 05:37 EST, Sabine Heider CLA
no flags Details | Diff
Patch containing one additional persistence.xml file as suggested by Kevin (10.41 KB, patch)
2009-12-09 05:59 EST, Adrian Goerler CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Heider CLA 2009-11-23 05:37:40 EST
Created attachment 152834 [details]
Patch containing explicit settings for eclipselink.target-database and eclipselink.weaving

Currently, the JPA tests pass the database platform and weaving related
settings as VM parameters to the test environment. While this works for
stand-alone tests, I have experienced problems in the application server case
where the tests are executed in the server's VM and therefore default values
for the database platform and weaving apply. 
For the database platform, this lead to failing tests due to incorrectly
generated SQL when running against a MySQL database. 
For weaving, a lot of tests failed on the NetWeaver application server because
it does not support dynamic weaving.

My suggestion would be to make both the database platform and the weaving
explicit in the persistence.xml file of the deployed test application. I have
attached a patch with the proposed change. 

Naturally, I don't have all the supported application servers at hand, so I
couldn't test the change there but tested it on NetWeaver only. I will install
a glassfish to cover a second platform and update this ticket (if no one else
confirms the patch until then).
Comment 1 Kevin Yuan CLA 2009-12-08 13:17:34 EST
One more persistence.xml need to modify: trunk\jpa\eclipselink.jpa.test\resource\eclipselink-ddl-generation-model\server_merge-inherited\persistence.xml. All other changes are correct.
Have run all JPA tests on WLS using Oracle 11.1.0.7 database, got expected results.
Comment 2 Adrian Goerler CLA 2009-12-09 05:59:24 EST
Created attachment 154102 [details]
Patch containing one additional persistence.xml file as suggested by Kevin
Comment 3 Adrian Goerler CLA 2009-12-09 06:11:27 EST
reviewed by Kevin Yuan
tested on 
- NetWeaver / MySQL
- WLS / Oracle 11

checked in at rev. #6011
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:02 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink