2010-07-30 5 views
0

Je reçois erreur près de catch Erreur: nécessaire java.lang.Throwabe org.springframework.oxm.XmlMappingException trouvaiOXM Spring obtenir erreur de cast de type près de catch

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); 
    } 
} 

Répondre

0

type coulée n'est pas autorisée dans l'instruction de capture argument.

Questions connexes