Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368314 - JAXBException logged while using anyattribute in OXM file for sub type of map while generating schema.
Summary: JAXBException logged while using anyattribute in OXM file for sub type of map...
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: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 00:30 EST by Vikram Bhatia CLA
Modified: 2022-06-09 10:22 EDT (History)
2 users (show)

See Also:


Attachments
Standalone Reproducer (8.03 KB, multipart/x-zip)
2012-01-11 00:31 EST, Vikram Bhatia CLA
no flags Details
Proposed Fix including testcase. (12.22 KB, patch)
2012-01-11 00:33 EST, Vikram Bhatia CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vikram Bhatia CLA 2012-01-11 00:30:02 EST
JAXBException logged when anyattribute is used for sub type of Map using
external metadata instead of using annotations.

javax.xml.bind.JAXBException:
Exception Description: XmlAnyAttribute is invalid on property others. Must be
used with a property of type Map.
 - with linked exception:
[Exception [EclipseLink-50004] (Eclipse Persistence Services -
2.4.0.qualifier): org.eclipse.persistence.exceptions.JAXBException
Exception Description: XmlAnyAttribute is invalid on property others. Must be
used with a property of type Map.]
at
org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextSta
te(JAXBContext.java:900)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:180)
at
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFacto
ry.java:146)
at
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFacto
ry.java:133)
at
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFacto
ry.java:93)
at
org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFacto
ry.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.xml.bind.ContextFinder.newInstance(Unknown Source)
at javax.xml.bind.ContextFinder.find(Unknown Source)
at javax.xml.bind.JAXBContext.newInstance(Unknown Source)
at examples.demo.ELBug361578.main(ELBug361578.java:34)
Caused by: Exception [EclipseLink-50004] (Eclipse Persistence Services -
2.4.0.qualifier): org.eclipse.persistence.exceptions.JAXBException
Exception Description: XmlAnyAttribute is invalid on property others. Must be
used with a property of type Map.
at
org.eclipse.persistence.exceptions.JAXBException.anyAttributeOnNonMap(JAXBExce
ption.java:161)
at
org.eclipse.persistence.jaxb.compiler.XMLProcessor.processXmlAnyAttribute(XMLP
rocessor.java:629)
at
org.eclipse.persistence.jaxb.compiler.XMLProcessor.processJavaAttribute(XMLPro
cessor.java:513)
at
org.eclipse.persistence.jaxb.compiler.XMLProcessor.processJavaType(XMLProcesso
r.java:474)
at
org.eclipse.persistence.jaxb.compiler.XMLProcessor.processXML(XMLProcessor.jav
a:362)
at
org.eclipse.persistence.jaxb.compiler.Generator.<init>(Generator.java:145)
at
org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextSta
te(JAXBContext.java:896)
... 13 more
Comment 1 Vikram Bhatia CLA 2012-01-11 00:31:39 EST
Created attachment 209294 [details]
Standalone Reproducer
Comment 2 Vikram Bhatia CLA 2012-01-11 00:33:54 EST
Created attachment 209295 [details]
Proposed Fix including testcase.
Comment 3 Rick Barkhouse CLA 2012-01-12 15:40:04 EST
Reviewed and checked into trunk.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:22:11 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink