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

Bug 368395

Summary: Marshal operation fails following a schema generation with generated classes
Product: z_Archived Reporter: Denise Smith <denise.mahar>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

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