Github user chrismattmann commented on a diff in the pull request: https://github.com/apache/oodt/pull/34#discussion_r42155693 --- Diff: filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java --- @@ -1286,10 +1272,24 @@ public String ingestProduct(Product product, Metadata metadata, + product.getProductType().getVersioner() + ": Message: " + e.getMessage()); throw new VersioningException(e); - } catch (Exception e) { - e.printStackTrace(); - LOG.log(Level.SEVERE, "Failed to ingest product [" + product - + "] : " + e.getMessage() + " -- rolling back ingest"); + } catch(XmlRpcException e2){ + LOG.log(Level.SEVERE, "Failed to ingest product [ name:" +product.getProductName() + "] :" + e2.getMessage() + " -- rolling back ingest"); + try { + Vector<Object> argList = new Vector<Object>(); + Hashtable<String, Object> productHash = XmlRpcStructFactory + .getXmlRpcProduct(product); + argList.add(productHash); + client.execute("filemgr.removeProduct", argList); + } catch (Exception e1) { + LOG.log(Level.SEVERE, "Failed to rollback ingest of product [" + + product + "] : " + e2.getMessage()); + } + throw new Exception(e2); + } + catch (Exception e) { + //e.printStackTrace(); --- End diff -- remove out commented code if it's not part of the patch.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---