Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 328283 - MOXy: Exception occurs with XmlElementRef(s) and XmlMixed on non-colleciton/map property
Summary: MOXy: Exception occurs with XmlElementRef(s) and XmlMixed on non-colleciton/m...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Matt MacIvor CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-20 15:29 EDT by David McCann CLA
Modified: 2022-06-09 10:04 EDT (History)
2 users (show)

See Also:


Attachments
Proposed Fix (1.18 KB, patch)
2010-11-18 15:50 EST, Matt MacIvor CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David McCann CLA 2010-10-20 15:29:11 EDT
When XmlElementRef(s) is used with XmlMixed on a non-collection/map property the following exception occurs:


Exception Description: The container class specified [class [Ljavax.xml.bind.JAXBElement;] cannot be used as a container because it does not implement Collection or Map.
	at org.eclipse.persistence.exceptions.ValidationException.illegalContainerClass(ValidationException.java:945)
	at org.eclipse.persistence.internal.queries.ContainerPolicy.buildPolicyFor(ContainerPolicy.java:359)
	at org.eclipse.persistence.internal.queries.ContainerPolicy.buildPolicyFor(ContainerPolicy.java:326)
	at org.eclipse.persistence.oxm.mappings.XMLAnyCollectionMapping.useCollectionClass(XMLAnyCollectionMapping.java:671)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateAnyCollectionMapping(MappingsGenerator.java:833)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappingForReferenceProperty(MappingsGenerator.java:654)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:436)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:1926)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:1891)
	at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:191)
	at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:176)
	at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:313)
	at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:245)
	... 25 more
Comment 1 Matt MacIvor CLA 2010-11-18 15:50:32 EST
Created attachment 183424 [details]
Proposed Fix
Comment 2 Matt MacIvor CLA 2010-11-18 15:54:22 EST
Attached patch checked in to SVN
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:04:53 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink