我在catch语句附近遇到错误: required java.lang.Throwabe found org.springframework.oxm.XmlMappingException
enter code here public void writeObjectToXml(Object object, String filename) throws IOException {
FileOutputStream fos = null;
try {
fos = new FileOutputStream(filename);
try {
marshaller.marshal(object, new StreamResult(fos));
} catch (XmlMappingException xme) {
}
fos.close();
} catch (Exception e) {
System.out.println("Error :: " + e);
}
}发布于 2010-07-30 20:13:42
catch语句参数中不允许类型转换。
https://stackoverflow.com/questions/3369754
复制相似问题