Community
Participate
Working Groups
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.
Temporarily disabled the JAXBContext memory improvements by forcing isRefreshable to return false.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink