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

Bug 367007

Summary: map values of javax.persistence.validation.mode are incorrectly throwing exception
Product: z_Archived Reporter: Bernd Müller <bernd23>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david.minsky
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Fix and testcase none

Description Bernd Müller CLA 2011-12-17 09:22:12 EST
Build Identifier: eclipselink-2.3.1.v20111018-r10243

JPA 2.0 spec section 3.6.1.1 mention auto, callback, none as correct values
of map key javax.persistence.validation.mode.
But EclipseLink 2.3.1 and lower throws an
Internal Exception: java.lang.IllegalArgumentException: No enum const class javax.persistence.ValidationMode.none

Reproducible: Always

Steps to Reproduce:
run code like the following:
Map<String, String> props = new HashMap<String, String>();
props.put("javax.persistence.validation.mode", "none"); // works with 'NONE'
EntityManagerFactory emf = Persistence.createEntityManagerFactory("..", props);
Comment 1 David Minsky CLA 2011-12-22 13:58:42 EST
Reproduced issue in trunk.
Comment 2 David Minsky CLA 2012-01-03 14:17:14 EST
Created attachment 208956 [details]
Fix and testcase
Comment 3 David Minsky CLA 2012-01-04 13:21:06 EST
Checked into trunk (2.4) at revision: 10644
Comment 4 David Minsky CLA 2012-01-04 15:21:13 EST
Checked into 2.3 branch at revision: 10645
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:23:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink