刚刚使用jaxb将类数组生成XML文件产生问题
caok 2009-01-09 10:39:17 HisKsxx[] ksxx = (HisKsxx[])coll.toArray(new HisKsxx[coll.size()]);
JAXBContext jaxbContext;
ByteArrayOutputStream stream = new ByteArrayOutputStream();
try {
jaxbContext = JAXBContext.newInstance(HisKsxx.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(ksxx, stream);
} catch (JAXBException ex) {
throw new DataNotFoundException(ex.getMessage());
}
为什么会提示nor and of its super class is known to this context
先说一下不使用数组生成没有问题。