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

Bug 344346

Summary: Can't <xml-bindings> xml-transient parent class when it has same name in different package.
Product: z_Archived Reporter: Ed Staub <edward.staub>
Component: EclipselinkAssignee: Blaise Doughan <blaise.doughan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox, edward.staub
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
MOXy - Test Cases
none
MOXy - Fix none

Description Ed Staub CLA 2011-04-29 16:41:11 EDT
Build Identifier: 2.1.1

I'm trying to use schemagen with external <xml-bindings> files in each relevant package, as shown in http://wiki.eclipse.org/EclipseLink/Examples/MOXy/GettingStarted/ExternalizedMetadata.

Class foo.MyOwnGrandpa extends class mumble.MyOwnGrandpa.

I can't really touch the classes involved - especially the parent class, which is generated.

If I set xml-transient on the parent class, I get an error out of the AnnotationsProcessor:

Exception Description: Name collision.  Two classes have the XML type with uri  and name myOwnGrandpa.

The bindings file for the mumble package has no effect in this context, because of xml-transient. The bindings passed in to the AnnotationsProcessor are for the child package. So the obvious workaround - change the parent-class xml name or namespace - can't be used.

Initially reported on the forum: http://www.eclipse.org/forums/index.php?t=msg&th=208228&start=0&S=0d5251eec8a1b3bab04d0cefd14216dc 


Reproducible: Always
Comment 1 Blaise Doughan CLA 2011-05-02 15:59:57 EDT
Created attachment 194537 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2011-05-02 16:00:55 EDT
Created attachment 194538 [details]
MOXy - Fix

Check to see if the type is transient before tracking it by QName.
Comment 3 Blaise Doughan CLA 2011-05-02 16:04:28 EDT
Fix checked into trunk at rev:  9291

Code reviewed by:  Matt MacIvor
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:04:40 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink