Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351112 - ClassCastException using Dynamic JAXB on Glassfish
Summary: ClassCastException using Dynamic JAXB on Glassfish
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-04 15:04 EDT by Rick Barkhouse CLA
Modified: 2022-06-09 10:18 EDT (History)
1 user (show)

See Also:


Attachments
Patch (1.11 KB, patch)
2011-07-04 16:08 EDT, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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