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

Bug 362984

Summary: Factory methods cannot be declared in abstract classes
Product: z_Archived Reporter: Sergio <bytecode42>
Component: EclipselinkAssignee: Rick Barkhouse <rick.barkhouse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, eclipselink.oxm-inbox, martin.grebac
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
URL: http://stackoverflow.com/questions/8022136/static-factory-methods-in-jaxb-moxy
Whiteboard:
Attachments:
Description Flags
Work in progress
none
Proposed patch
none
Patch additions
none
Patch none

Description Sergio CLA 2011-11-06 06:09:55 EST
When trying to define a static factory method in an abstract class I am obtaining the following exception:

Exception [EclipseLink-171] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: The factory class does not define a public default constructor, or the constructor raised an exception.
Internal Exception: java.lang.InstantiationException



More information about the problem here:
http://stackoverflow.com/questions/8022136/static-factory-methods-in-jaxb-moxy
Comment 1 Rick Barkhouse CLA 2011-11-07 16:57:48 EST
Created attachment 206554 [details]
Work in progress
Comment 2 Rick Barkhouse CLA 2011-11-08 16:13:15 EST
Created attachment 206625 [details]
Proposed patch
Comment 3 Rick Barkhouse CLA 2011-11-08 16:33:37 EST
Fixed and checked into trunk.
Comment 4 Rick Barkhouse CLA 2011-11-08 16:34:20 EST
Keeping open until we check into 2.3.2.
Comment 5 Rick Barkhouse CLA 2011-11-09 14:16:12 EST
Created attachment 206728 [details]
Patch additions
Comment 6 Rick Barkhouse CLA 2011-11-09 15:34:40 EST
Created attachment 206736 [details]
Patch
Comment 7 Rick Barkhouse CLA 2011-11-09 15:47:19 EST
Fixed in both trunk and 2.3.
Comment 8 Eclipse Webmaster CLA 2022-06-09 10:08:23 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink