| Summary: | Enum metadata processing should not load classes | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Shaun Smith <shaun.smith> | ||||||||||||||
| Component: | Eclipselink | Assignee: | Shaun Smith <shaun.smith> | ||||||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P3 | ||||||||||||||||
| Version: | unspecified | ||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Windows XP | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
Created attachment 173458 [details]
EnumTypeConverter.java patch
Created attachment 173669 [details]
EnumTypeConverter.java patch
Created attachment 173670 [details]
EnumTypeConverter.java.patch
Created attachment 173677 [details]
EnumeratedMetadata.java patch
Revised patch using new EnumTypeConverter constructor that takes a boolean useOrdinalValues.
Created attachment 173678 [details]
EnumTypeConverter.java.patch
Adds new constructor that supports specification of enum class *name* and whether to use ordinal values--used by EnumeratedMetadata.process(..)
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Created attachment 173457 [details] EnumeratedMetadata.java patch org.eclipse.persistence.internal.jpa.metadata.converters.EnumeratedMetadata.process creates an EnumTypeConverter and calls getJavaClass(referenceClass) which attempts to load the actual Java class pointed at by the MetadataClass referenceClass. In Gemini, metadata is processed before a classloader is available and so this attempt to class load fails and persistence unit deployment fails. The solution is to pass the name of the class to the EnumTypeConverter and let it lazily initialize the actual Java class--post metadata processing. Patches for EnumTypeConverter and EnumeratedMetadata attached.