I am doing using JAXB to unmarshall some XML into Java objects:
My code looks a little like this:
InputStream testMsg = getClass().getResourceAsStream("TestDocumentEvent.xml");
Unmarshaller unmarshaller = JAXBContext.newInstance(DocumentEvent.class).createUnmarshaller();
DocumentEvent unmarshalled = (DocumentEvent) unmarshaller.unmarshal(testMsg);
However, when I run this code I get an exception:
java.lang.IllegalArgumentException: is parameter must not be null
What's going on?