List of usage examples for javax.xml.bind UnmarshalException printStackTrace
public void printStackTrace()
From source file:com.rabidgremlin.legalbeagle.util.HttpHelper.java
private JAXBElement<Model> unMarshallPom(String pom) { try {/*from w w w . j a v a2 s .c o m*/ return (JAXBElement<Model>) u.unmarshal(new StringReader(pom)); } catch (javax.xml.bind.UnmarshalException e) { // System.out.println(e); // return null; if (e.getMessage().startsWith("unexpected element (uri:\"\", local:\"project\")")) { try { pom = pom.replaceFirst("<project>", "<project xmlns=\"http://maven.apache.org/POM/4.0.0\">"); // System.out.println("***POM is " + pom); return (JAXBElement<Model>) u.unmarshal(new StringReader(pom)); } catch (Exception ex) { e.printStackTrace(); return null; } } else { e.printStackTrace(); return null; } } catch (JAXBException e) { return null; } }