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

Bug 347958

Summary: Parametrized values annotated with XmlElement throw IndexOutOfBoundsException
Product: z_Archived Reporter: Nick Dunn <i82much>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: blaise.doughan, eclipselink.oxm-inbox, i82much
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=329598
Whiteboard:
Attachments:
Description Flags
This is the class that causes the problem.
none
Stack trace
none
Standard JAXB implementation's serialization none

Description Nick Dunn CLA 2011-06-01 11:11:32 EDT
Build Identifier: 20090619-0625 

I attempted to use a ListWrapper object, as raw lists are not serialized correctly by JAXB (as per http://stackoverflow.com/questions/1603404/using-jaxb-to-unmarshal-marshal-a-liststring ).  When the object in question has a parametrized type (ListWrapper<T>), the JaxbContext fails to initialize.  When the wrapper is concrete and does not have type parameters, things work as expected.

Reproducible: Always

Steps to Reproduce:
1. Create a class that has type parameter <E> and which contains a List similarly parametrized (List<E>)
2. Attempt to create a new JAXBContext using this class as one of the elements passed in
3. Get a long stack trace about IndexOutOfBoundsException
Comment 1 Nick Dunn CLA 2011-06-01 11:12:36 EDT
Created attachment 197098 [details]
This is the class that causes the problem.

This is the class that causes the problem.
Comment 2 Nick Dunn CLA 2011-06-01 11:13:25 EDT
Created attachment 197099 [details]
Stack trace

Here is the stack trace
Comment 3 Nick Dunn CLA 2011-06-01 11:15:44 EDT
Created attachment 197101 [details]
Standard JAXB implementation's serialization

When using the standard JAXBContextFactory rather than moxy's, the class is serialized fine.
Comment 4 Blaise Doughan CLA 2011-06-01 12:53:06 EDT
This issue has already been fixed in the EclipseLink 2.3.0 stream (which is currently at release candidate 3).  A nightly download can be obtained here:

- http://www.eclipse.org/eclipselink/downloads/nightly.php

If you cannot upgrade or require the fix on a previous version please re-open the bug, and include the required version.

*** This bug has been marked as a duplicate of bug 340898 ***
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:21:12 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink