JAXBContext jc;
Unmarshaller u;
Settings s;
try {
jc = JAXBContext.newInstance( "org.jooq.conf");
u = jc.createUnmarshaller();
u.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
JAXBElement<Settings> j = (JAXBElement<Settings>) u.unmarshal( new File( "./jooq-runtime.xml" ) ); // ok
s = j.getValue();
} catch (JAXBException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
I gets some similar validation error from the DefaultValidationEventHandler. It seems JAXB is does the validation by inspecting the Settings class instead of reaching out to find the actual .xsd file. This might be the reason why unmarshaling returns a incomplete Setting object(packed with default values).
As you may have already been aware, the Settings class probably also needs to by fixed in some way so that the unmarshaling can work correctly. Let me know if I am understanding anything wrong here.
Also, I am kind new to GitHub, is there a way I can pack and use the current master copy before JOOQ 3.0 actually got released.
Thanks,
Sean