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

Bug 336093

Summary: Class with an abstract superclass is marshalled with superfluous attributes from xsi namespace
Product: z_Archived Reporter: Zdenek Farana <zdenek.farana>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P4 CC: blaise.doughan, denise.mahar, eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=340671
Whiteboard:
Attachments:
Description Flags
Test Cases none

Description Zdenek Farana CLA 2011-02-02 11:26:35 EST
Build Identifier: 2.3.0-SNAPSHOT (20110202.060516-27)

If the class Foo with an abstract superclass is marshalled, the output looks like:

<Foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="foo"></Foo>

instead of

<Foo></Foo>

It causes another problems when you try to unmarshal such string. If there is any such class in JAXBContext, every other class marshalled with the marshaller (created from such context) has similar redundant attributes. Reinitializating JAXBContext doesn't help.

Reproducible: Always

Steps to Reproduce:
See the attached test cases.
Comment 1 Zdenek Farana CLA 2011-02-02 11:34:09 EST
Created attachment 188162 [details]
Test Cases

FooTest - how it should work
FooWithAncestor - how it doesn't work
Comment 2 Denise Smith CLA 2011-05-16 16:03:01 EDT
 Fixed related bug 340671 which covered this use case as well.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:29 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink