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

Bug 351112

Summary: ClassCastException using Dynamic JAXB on Glassfish
Product: z_Archived Reporter: Rick Barkhouse <rick.barkhouse>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: shaun.smith
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch none

Description Rick Barkhouse CLA 2011-07-04 15:04:38 EDT
Due to a classloader issue, a ClassCastException may be encountered when using Dynamic JAXB on Glassfish (or other server environment).

When OXMJavaModelImpl tries looking up a class to see if it exists yet (to see if it needs to create a dynamic type), we do a standard Class.forName check.  However we must pass in the user's classloader, or we may not find the concrete class even if it exists.
Comment 1 Rick Barkhouse CLA 2011-07-04 16:08:46 EDT
Created attachment 199072 [details]
Patch
Comment 2 Rick Barkhouse CLA 2011-07-04 16:10:11 EDT
Fixed and checked into trunk.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:18:58 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink