Here is the code I'm trying to run but it is currently throwing an exception at this line:
try {
File file = new File(getFilesDir().getPath() + "/" + name + ".xml");
JAXBContext jaxbContext = JAXBContext.newInstance(Restaurant.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(r, file);
} catch (JAXBException e) {
e.printStackTrace();
}
I'm getting an exception thrown at this line:
JAXBContext jaxbContext = JAXBContext.newInstance(Restaurant.class);
I copied the log to pastebin (https://pastebin.com/WRjXbub7)
I am trying to serialize an object to a XML file. I'm not getting red marks or anything in my code, so I don't know what the issue is here. Thanks!