Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357006 - OutOfMemoryError when XmlElementDecl has same name and substitutionHeadName
Summary: OutOfMemoryError when XmlElementDecl has same name and substitutionHeadName
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-07 16:42 EDT by Paul Fullbright CLA
Modified: 2022-06-09 10:36 EDT (History)
2 users (show)

See Also:


Attachments
Patch - 2.3 (2.10 KB, patch)
2011-09-22 16:16 EDT, Rick Barkhouse CLA
no flags Details | Diff
Patch - 2.4 (2.10 KB, patch)
2011-09-22 16:16 EDT, Rick Barkhouse CLA
no flags Details | Diff
Patch - 2.3 (12.52 KB, patch)
2011-09-23 13:39 EDT, Rick Barkhouse CLA
no flags Details | Diff
Patch - 2.4 (12.52 KB, patch)
2011-09-23 13:40 EDT, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2011-09-07 16:42:10 EDT
(Occurs in head, 9/7/11)

With ObjectFactory method like:

@XmlElementDecl(name = "product", substitutionHeadName = "product")
public JAXBElement<ProductType> createProduct(ProductType value) {
    return new JAXBElement<ProductType>(_Product_QNAME, ProductType.class, null, value);
}

you receive a stack trace like:

java.lang.OutOfMemoryError: Java heap space
	at java.util.Arrays.copyOf(Arrays.java:2760)
	at java.util.Arrays.copyOf(Arrays.java:2734)
	at java.util.ArrayList.ensureCapacity(ArrayList.java:167)
	at java.util.ArrayList.add(ArrayList.java:351)
	at org.eclipse.persistence.jaxb.compiler.ElementDeclaration.addSubstitutableElement(ElementDeclaration.java:108)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.updateGlobalElements(AnnotationsProcessor.java:3313)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.postBuildTypeInfo(AnnotationsProcessor.java:595)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildNewTypeInfo(AnnotationsProcessor.java:4076)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.buildTypeInfo(AnnotationsProcessor.java:674)
	at org.eclipse.persistence.jaxb.compiler.AnnotationsProcessor.postBuildTypeInfo(AnnotationsProcessor.java:594)

...
Comment 1 Rick Barkhouse CLA 2011-09-22 16:16:07 EDT
Created attachment 203863 [details]
Patch - 2.3
Comment 2 Rick Barkhouse CLA 2011-09-22 16:16:52 EDT
Created attachment 203864 [details]
Patch - 2.4
Comment 3 Rick Barkhouse CLA 2011-09-23 13:39:47 EDT
Created attachment 203923 [details]
Patch - 2.3
Comment 4 Rick Barkhouse CLA 2011-09-23 13:40:05 EDT
Created attachment 203924 [details]
Patch - 2.4
Comment 5 Rick Barkhouse CLA 2011-09-23 13:48:36 EDT
Fixed, reviewed by dmahar.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:14:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:36:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink