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

Bug 326339

Summary: Throw exception if mapping a DataHandler when required dependencies are unavailable
Product: z_Archived Reporter: Matt MacIvor <matt.macivor>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed Fix none

Description Matt MacIvor CLA 2010-09-27 14:41:40 EDT
In EclipseLink SDO, if both the javax.activation and javax.mail packages are not available on the classpath, an XMLBinaryDataMapping cannot be used. As a result, if a mapping is being generated for a DataHandler, but javax.mail is not on the classpath, a DirectMapping is generated, which is unable to properly process a DataHandler.

Since EclipseLink can't handle a DataHandler without a BinaryDataMapping, in the condition that a mapping for a DataHandler is being generated, but a dependency required for XMLBinaryDataMapping is missing, an exception should be thrown.
Comment 1 Matt MacIvor CLA 2010-09-28 14:31:33 EDT
Created attachment 179775 [details]
Proposed Fix
Comment 2 Matt MacIvor CLA 2010-09-29 14:59:27 EDT
Attached patch checked into SVN
Reviewed by Blaise Doughan
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:56 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:26:56 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink