Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368395 - Marshal operation fails following a schema generation with generated classes
Summary: Marshal operation fails following a schema generation with generated classes
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: 2012-01-11 16:02 EST by Denise Smith CLA
Modified: 2022-06-09 10:24 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denise Smith CLA 2012-01-11 16:02:41 EST
Create a simple TypeMappingInfo

 TypeMappingInfo tmi = new TypeMappingInfo();
 tmi.setXmlTagName(new QName("theuri","root"));       
 tmi.setElementScope(ElementScope.Global);	      
 tmi.setType(QName.class);	

 JAXBContext ctx = JAXBContextFactory.createContext(tmis, null,getClass().getClassLoader());
  JAXBMarshaller m = (JAXBMarshaller) ctx.createMarshaller();
XMLStreamWriter xw = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
 m.marshal(new QName("myuri","somwthing"), xw, tmi);

Everything marshals fine.

However if before the marshal you use ctx.generateSchema then the marshal fails.  Changing JAXBContext.isRefreshable to always return false makes this pass.
Comment 1 Rick Barkhouse CLA 2012-01-12 16:53:11 EST
Temporarily disabled the JAXBContext memory improvements by forcing isRefreshable to return false.
Comment 2 Eclipse Webmaster CLA 2022-06-09 10:17:07 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:24:46 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink