【发布时间】:2009-03-18 05:41:59
【问题描述】:
我正在使用 JAXB 将一些 XML 解组为 Java 对象:
我的代码看起来有点像这样:
InputStream testMsg = getClass().getResourceAsStream("TestDocumentEvent.xml");
Unmarshaller unmarshaller = JAXBContext.newInstance(DocumentEvent.class).createUnmarshaller();
DocumentEvent unmarshalled = (DocumentEvent) unmarshaller.unmarshal(testMsg);
但是,当我运行此代码时出现异常:
java.lang.IllegalArgumentException: is parameter must not be null
发生了什么事?
【问题讨论】: