OODT-909 create improved exceptions

Project: http://git-wip-us.apache.org/repos/asf/oodt/repo
Commit: http://git-wip-us.apache.org/repos/asf/oodt/commit/0c67a330
Tree: http://git-wip-us.apache.org/repos/asf/oodt/tree/0c67a330
Diff: http://git-wip-us.apache.org/repos/asf/oodt/diff/0c67a330

Branch: refs/heads/master
Commit: 0c67a330500eead763869201a3541c52f215b787
Parents: 249931a
Author: Tom Barber <[email protected]>
Authored: Wed Oct 28 00:07:44 2015 +0000
Committer: Tom Barber <[email protected]>
Committed: Wed Oct 28 00:07:44 2015 +0000

----------------------------------------------------------------------
 .../catalog/query/parser/SimpleCharStream.java  |   2 +-
 .../repository/SerializedCatalogRepository.java |  13 +-
 .../system/impl/CatalogServiceLocal.java        |   2 +-
 .../crawl/action/FilemgrUniquenessChecker.java  |   2 +-
 .../apache/oodt/cas/crawl/action/MoveFile.java  |   2 +-
 .../crawl/action/WorkflowMgrStatusUpdate.java   |   2 +-
 .../cas/crawl/daemon/CrawlDaemonController.java |  24 +--
 .../cas/filemgr/catalog/DataSourceCatalog.java  |  47 +++--
 .../catalog/LenientDataSourceCatalog.java       |  14 +-
 .../oodt/cas/filemgr/catalog/LuceneCatalog.java |  20 +-
 .../cas/filemgr/catalog/ScienceDataCatalog.java |  14 +-
 .../catalog/solr/DefaultProductSerializer.java  |   2 +-
 .../cas/filemgr/catalog/solr/SolrCatalog.java   |   8 +-
 .../oodt/cas/filemgr/ingest/CachedIngester.java |   4 +-
 .../oodt/cas/filemgr/ingest/LocalCache.java     |  10 +-
 .../oodt/cas/filemgr/ingest/RmiCache.java       |   6 +-
 .../structs/exceptions/CacheException.java      |   5 +
 .../structs/exceptions/CatalogException.java    |   5 +
 .../exceptions/RepositoryManagerException.java  |   6 +
 .../cas/filemgr/system/XmlRpcFileManager.java   |  48 ++---
 .../filemgr/system/XmlRpcFileManagerClient.java | 182 +++++++++----------
 .../validation/DataSourceValidationLayer.java   |  24 +--
 22 files changed, 229 insertions(+), 213 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
----------------------------------------------------------------------
diff --git 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
index 1fd645d..3872048 100644
--- 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
+++ 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
@@ -76,7 +76,7 @@ public class SimpleCharStream
     }
     catch (Throwable t)
     {
-      throw new Error(t.getMessage());
+      throw new Error(t.getMessage(),t);
     }
 
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
----------------------------------------------------------------------
diff --git 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
index 65465bb..21964a6 100644
--- 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
+++ 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/repository/SerializedCatalogRepository.java
@@ -17,6 +17,12 @@
 package org.apache.oodt.cas.catalog.repository;
 
 //JDK imports
+import org.apache.commons.io.FileUtils;
+import org.apache.oodt.cas.catalog.exception.CatalogRepositoryException;
+import org.apache.oodt.cas.catalog.system.Catalog;
+import org.apache.oodt.cas.catalog.util.PluginURL;
+import org.apache.oodt.cas.catalog.util.Serializer;
+
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -28,13 +34,7 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 
 //APACHE imports
-import org.apache.commons.io.FileUtils;
-
 //OODT imports
-import org.apache.oodt.cas.catalog.exception.CatalogRepositoryException;
-import org.apache.oodt.cas.catalog.system.Catalog;
-import org.apache.oodt.cas.catalog.util.PluginURL;
-import org.apache.oodt.cas.catalog.util.Serializer;
 
 /**
  * @author bfoster
@@ -56,6 +56,7 @@ public class SerializedCatalogRepository implements 
CatalogRepository {
                        new File(this.storageDir + "/classloaders").mkdirs();
                }catch(Exception e) {
                        e.printStackTrace();
+                       LOG.log(Level.SEVERE, e.getMessage());
                        throw new InstantiationException("Failed to instantiate 
SerializedCatalogRepository : " + e.getMessage());
                }
        }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
----------------------------------------------------------------------
diff --git 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
index 07b816b..9832110 100644
--- 
a/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
+++ 
b/catalog/src/main/java/org/apache/oodt/cas/catalog/system/impl/CatalogServiceLocal.java
@@ -89,7 +89,7 @@ public class CatalogServiceLocal implements CatalogService {
                        this.disableIntersectingCrossCatalogQueries = 
disableIntersectingCrossCatalogQueries;
                        this.crossCatalogResultSortingThreshold = 
crossCatalogResultSortingThreshold;
                }catch (Exception e) {
-                       e.printStackTrace();
+                       LOG.log(Level.SEVERE,e.getMessage());
                        throw new InstantiationException(e.getMessage());
                }
        }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
----------------------------------------------------------------------
diff --git 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
index 96b6d5b..4c367d7 100644
--- 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
+++ 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/FilemgrUniquenessChecker.java
@@ -52,7 +52,7 @@ public class FilemgrUniquenessChecker extends CrawlerAction {
          return 
!fmClient.hasProduct(productMetadata.getMetadata(PRODUCT_NAME));
       } catch (Exception e) {
          throw new CrawlerActionException("Product failed uniqueness check : ["
-               + product + "] : " + e.getMessage());
+               + product + "] : " + e.getMessage(), e);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/crawler/src/main/java/org/apache/oodt/cas/crawl/action/MoveFile.java
----------------------------------------------------------------------
diff --git 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/MoveFile.java 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/MoveFile.java
index 462d598..42809a0 100644
--- a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/MoveFile.java
+++ b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/MoveFile.java
@@ -76,7 +76,7 @@ public class MoveFile extends CrawlerAction {
                 return true; //File copied
       } catch (Exception e) {
          throw new CrawlerActionException("Failed to move file from " + mvFile
-               + " to " + this.toDir + " : " + e.getMessage());
+               + " to " + this.toDir + " : " + e.getMessage(), e);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/crawler/src/main/java/org/apache/oodt/cas/crawl/action/WorkflowMgrStatusUpdate.java
----------------------------------------------------------------------
diff --git 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/WorkflowMgrStatusUpdate.java
 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/WorkflowMgrStatusUpdate.java
index 652a875..99d359e 100644
--- 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/action/WorkflowMgrStatusUpdate.java
+++ 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/action/WorkflowMgrStatusUpdate.java
@@ -57,7 +57,7 @@ public class WorkflowMgrStatusUpdate extends CrawlerAction 
implements
                + ingestSuffix, productMetadata);
       } catch (Exception e) {
          throw new CrawlerActionException(
-               "Failed to update workflow manager : " + e.getMessage());
+               "Failed to update workflow manager : " + e.getMessage(), e);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
----------------------------------------------------------------------
diff --git 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
index cf4ed40..d201d44 100644
--- 
a/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
+++ 
b/crawler/src/main/java/org/apache/oodt/cas/crawl/daemon/CrawlDaemonController.java
@@ -62,9 +62,9 @@ public class CrawlDaemonController {
             avgCrawlTime = (Double) client.execute(
                 "crawldaemon.getAverageCrawlTime", argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         return avgCrawlTime;
@@ -79,9 +79,9 @@ public class CrawlDaemonController {
             milisCrawling = (Integer) client.execute(
                 "crawldaemon.getMilisCrawling", argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         return milisCrawling;
@@ -96,9 +96,9 @@ public class CrawlDaemonController {
             waitInterval = (Integer) client.execute(
                 "crawldaemon.getWaitInterval", argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         return waitInterval;
@@ -112,9 +112,9 @@ public class CrawlDaemonController {
             numCrawls = (Integer) client.execute("crawldaemon.getNumCrawls",
                 argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         return numCrawls;
@@ -129,9 +129,9 @@ public class CrawlDaemonController {
             running = (Boolean) client.execute("crawldaemon.isRunning",
                 argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         return running;
@@ -144,9 +144,9 @@ public class CrawlDaemonController {
         try {
             running = (Boolean) client.execute("crawldaemon.stop", argList);
         } catch (XmlRpcException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         } catch (IOException e) {
-            throw new CrawlException(e.getMessage());
+            throw new CrawlException(e.getMessage(), e);
         }
 
         if (running) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/DataSourceCatalog.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/DataSourceCatalog.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/DataSourceCatalog.java
index 306d86f..b37e8aa 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/DataSourceCatalog.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/DataSourceCatalog.java
@@ -151,7 +151,7 @@ public class DataSourceCatalog implements Catalog {
             throw new CatalogException(
                     "ValidationLayerException when trying to obtain element 
list for product type: "
                             + product.getProductType().getName()
-                            + ": Message: " + e.getMessage());
+                            + ": Message: " + e.getMessage(), e);
         }
 
       for (Element element : metadataTypes) {
@@ -206,7 +206,7 @@ public class DataSourceCatalog implements Catalog {
             throw new CatalogException(
                     "ValidationLayerException when trying to obtain element 
list for product type: "
                             + product.getProductType().getName()
-                            + ": Message: " + e.getMessage());
+                            + ": Message: " + e.getMessage(), e);
         }
 
       for (Element element : metadataTypes) {
@@ -334,7 +334,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback addProduct transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -396,7 +396,6 @@ public class DataSourceCatalog implements Catalog {
             updateReferences(product);
 
         } catch (Exception e) {
-            e.printStackTrace();
             LOG.log(Level.WARNING, "Exception modifying product. Message: "
                     + e.getMessage());
             try {
@@ -407,7 +406,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback modifyProduct transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (statement != null) {
@@ -481,7 +480,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback removeProduct transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (statement != null) {
                 try {
@@ -541,7 +540,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback setProductTransferStatus 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (statement != null) {
@@ -620,7 +619,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback addProductReferences transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (statement != null) {
@@ -682,7 +681,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback getProductById transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -755,7 +754,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback getProductByName transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -832,7 +831,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback getProductTypeById transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -909,7 +908,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback getProductstransaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -997,7 +996,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback getProductsByProductType 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -1058,7 +1057,7 @@ public class DataSourceCatalog implements Catalog {
                 throw new CatalogException(
                         "ValidationLayerException when trying to obtain 
element list for product type: "
                                 + product.getProductType().getName()
-                                + ": Message: " + e.getMessage());
+                                + ": Message: " + e.getMessage(), e);
             }
 
             while (rs.next()) {
@@ -1078,7 +1077,7 @@ public class DataSourceCatalog implements Catalog {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception getting metadata. Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -1148,7 +1147,7 @@ public class DataSourceCatalog implements Catalog {
                 throw new CatalogException(
                         "ValidationLayerException when trying to obtain 
element list for product type: "
                                 + product.getProductType().getName()
-                                + ": Message: " + e.getMessage());
+                                + ": Message: " + e.getMessage(), e);
             }
 
             while (rs.next()) {
@@ -1168,7 +1167,7 @@ public class DataSourceCatalog implements Catalog {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception getting metadata. Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -1282,7 +1281,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback get top N products. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(),e);
         } finally {
 
             if (rs != null) {
@@ -1372,7 +1371,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback add metadata value. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (statement != null) {
                 try {
@@ -1436,7 +1435,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback remove metadata value. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (statement != null) {
                 try {
@@ -1504,7 +1503,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback get num products. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -1827,7 +1826,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback get num results transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -2047,7 +2046,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback query transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -2191,7 +2190,7 @@ public class DataSourceCatalog implements Catalog {
                         "Unable to rollback updateProductReferences 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
           if (statement != null) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LenientDataSourceCatalog.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LenientDataSourceCatalog.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LenientDataSourceCatalog.java
index c2593fc..f9ff91d 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LenientDataSourceCatalog.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LenientDataSourceCatalog.java
@@ -150,7 +150,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
             throw new CatalogException(
                     "ValidationLayerException when trying to obtain element 
list for product type: "
                             + product.getProductType().getName()
-                            + ": Message: " + e.getMessage());
+                            + ": Message: " + e.getMessage(), e);
         }
         
       } else {
@@ -234,7 +234,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception getting metadata. Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -283,7 +283,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
             throw new CatalogException(
                     "ValidationLayerException when trying to obtain element 
list for product type: "
                             + product.getProductType().getName()
-                            + ": Message: " + e.getMessage());
+                            + ": Message: " + e.getMessage(), e);
         }
 
         while (rs.next()) {
@@ -363,7 +363,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception getting metadata. Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {
@@ -454,7 +454,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
                         "Unable to rollback add metadata value. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (statement != null) {
                 try {
@@ -522,7 +522,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
                         "Unable to rollback remove metadata value. Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (statement != null) {
                 try {
@@ -718,7 +718,7 @@ public class LenientDataSourceCatalog extends 
DataSourceCatalog {
                         "Unable to rollback get num results transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
 
             if (rs != null) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
index fe49e42..a3cfc72 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/LuceneCatalog.java
@@ -199,7 +199,7 @@ public class LuceneCatalog implements Catalog {
                    throw new CatalogException(
                            "ValidationLayerException when trying to obtain 
element list for product type: "
                                    + product.getProductType().getName()
-                                   + ": Message: " + e.getMessage());
+                                   + ": Message: " + e.getMessage(), e);
                }
         } else {
                // remove all metadata
@@ -396,7 +396,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -445,7 +445,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -510,7 +510,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -567,7 +567,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -604,7 +604,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -689,7 +689,7 @@ public class LuceneCatalog implements Catalog {
                     "IOException when opening index directory: ["
                             + indexFilePath + "] for search: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (searcher != null) {
                 try {
@@ -920,7 +920,7 @@ public class LuceneCatalog implements Catalog {
             LOG.log(Level.WARNING,
                     "CatalogException when doing paged product query: Message: 
"
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
     }
@@ -940,7 +940,7 @@ public class LuceneCatalog implements Catalog {
             LOG.log(Level.WARNING, "Exception removing product: ["
                     + product.getProductName() + "] from index: Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } finally {
             if (reader != null) {
                 try {
@@ -981,7 +981,7 @@ public class LuceneCatalog implements Catalog {
                     + e.getMessage(), e);
             throw new CatalogException("Unable to index product: ["
                     + cp.getProduct().getProductName() + "]: Message: "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         } finally {
             try {
                 if (writer != null) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/ScienceDataCatalog.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/ScienceDataCatalog.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/ScienceDataCatalog.java
index 075e89d..0948995 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/ScienceDataCatalog.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/ScienceDataCatalog.java
@@ -200,7 +200,7 @@ public class ScienceDataCatalog implements Catalog {
       LOG.log(Level.WARNING,
           "Exception adding product metadata. Message: " + e.getMessage());
       e.printStackTrace();
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e.getMessage(), e);
     }
   }
 
@@ -226,7 +226,7 @@ public class ScienceDataCatalog implements Catalog {
       LOG.log(Level.WARNING,
           "SQL Exception querying for granule existence. Last query was: "
               + queryExists + " , Message: " + e.getMessage());
-      throw new SQLException(e.getMessage());
+      throw new SQLException(e.getMessage(), e);
     } finally {
       if (statement != null) {
         try {
@@ -252,7 +252,7 @@ public class ScienceDataCatalog implements Catalog {
         String maxQuery = "SELECT MAX(granule_id) AS max_id FROM granule";
         granuleId = this.commitQuery(new StringBuffer(query), maxQuery);
       } catch (Exception e) {
-        throw new CatalogException(e.getMessage());
+        throw new CatalogException(e.getMessage(), e);
       }
     }
 
@@ -283,7 +283,7 @@ public class ScienceDataCatalog implements Catalog {
       LOG.log(Level.WARNING,
           "SQL Exception querying for parameter existence. Last query was: "
               + queryExists + " , Message: " + e.getMessage());
-      throw new SQLException(e.getMessage());
+      throw new SQLException(e.getMessage(), e);
     } finally {
       if (statement != null) {
         try {
@@ -311,7 +311,7 @@ public class ScienceDataCatalog implements Catalog {
         String maxQuery = "SELECT MAX(parameter_id) AS max_id FROM parameter";
         parameterId = this.commitQuery(new StringBuffer(query), maxQuery);
       } catch (Exception e) {
-        throw new CatalogException(e.getMessage());
+        throw new CatalogException(e.getMessage(), e);
       }
     }
 
@@ -357,7 +357,7 @@ public class ScienceDataCatalog implements Catalog {
             "Unable to rollback addMetadata transaction. Message: "
                 + e2.getMessage());
       }
-      throw new SQLException(e.getMessage());
+      throw new SQLException(e.getMessage(), e);
     } finally {
       if (statement != null) {
         try {
@@ -983,7 +983,7 @@ public class ScienceDataCatalog implements Catalog {
         LOG.log(Level.SEVERE, "Unable to rollback query transaction. Message: "
             + e2.getMessage());
       }
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e.getMessage(), e);
     } finally {
 
       if (rs != null) {

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
index 0b489be..796bf96 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/DefaultProductSerializer.java
@@ -164,7 +164,7 @@ public class DefaultProductSerializer implements 
ProductSerializer {
                
                } catch(Exception e) {
                        e.printStackTrace();
-                       throw new CatalogException(e.getMessage());
+                       throw new CatalogException(e.getMessage(), e);
                }
                
        }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrCatalog.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrCatalog.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrCatalog.java
index 9812605..382b9e3 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrCatalog.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/solr/SolrCatalog.java
@@ -387,7 +387,7 @@ public class SolrCatalog implements Catalog {
                        return this.pagedQuery(new Query(), type, 1);
                        
                } catch(CatalogException e) {
-                       throw new RuntimeException(e.getMessage());
+                       throw new RuntimeException(e.getMessage(), e);
                }
        }
 
@@ -406,7 +406,7 @@ public class SolrCatalog implements Catalog {
                        return pagedQuery(new Query(), type, numOfPages);
                
                } catch(CatalogException e) {
-                       throw new RuntimeException(e.getMessage());
+                       throw new RuntimeException(e.getMessage(), e);
                }
                
        }
@@ -421,7 +421,7 @@ public class SolrCatalog implements Catalog {
                        return this.pagedQuery(new Query(), type, 
currentPage.getPageNum()+1);
                        
                } catch(CatalogException e) {
-                       throw new RuntimeException(e.getMessage());
+                       throw new RuntimeException(e.getMessage(), e);
                }
                
        }
@@ -436,7 +436,7 @@ public class SolrCatalog implements Catalog {
                        return this.pagedQuery(new Query(), type, 
prevPageNumber);
                        
                } catch(CatalogException e) {
-                       throw new RuntimeException(e.getMessage());
+                       throw new RuntimeException(e.getMessage(), e);
                }
                
        }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/CachedIngester.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/CachedIngester.java 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/CachedIngester.java
index f82ef5e..efb6a40 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/CachedIngester.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/CachedIngester.java
@@ -127,13 +127,13 @@ public class CachedIngester extends StdIngester {
                                 + "]: Message: " + e.getMessage());
                 throw new CatalogException(
                         "Exception re-syncing cache to file manager: [" + fmUrl
-                                + "]: Message: " + e.getMessage());
+                                + "]: Message: " + e.getMessage(), e);
             }
             return cache.contains(productName);
         }
       } catch (URISyntaxException e) {
         LOG.log(Level.SEVERE, "Exception getting URI from URL");
-        throw new CatalogException("Exception getting URL from URL: Message: " 
+ e.getMessage());
+        throw new CatalogException("Exception getting URL from URL: Message: " 
+ e.getMessage(), e);
       }
     }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
index 8ea8634..dcdfa04 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/LocalCache.java
@@ -128,7 +128,7 @@ public class LocalCache implements Cache {
             }
         } catch (Exception e) {
             throw new CacheException("Failed to sync with database : "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 
@@ -228,7 +228,7 @@ public class LocalCache implements Cache {
             throw new CacheException(
                     "Unable to check for product reception from file manager: 
["
                             + fm.getFileManagerUrl() + "]: Message: "
-                            + e.getMessage());
+                            + e.getMessage(), e);
         }
     }
 
@@ -280,7 +280,7 @@ public class LocalCache implements Cache {
         } catch (Exception e) {
             throw new CacheException("Failed to query for product via element "
                     + elementName + " and range " + startOfQuery + " to "
-                    + endOfQuery + " : " + e.getMessage());
+                    + endOfQuery + " : " + e.getMessage(), e);
         }
         
         return products;
@@ -292,7 +292,7 @@ public class LocalCache implements Cache {
             return fm.query(query, fm.getProductTypeByName(productType));
         } catch (Exception e) {
             throw new CacheException("Failed to get product list for query "
-                    + query + " : " + e.getMessage());
+                    + query + " : " + e.getMessage(), e);
         }
     }
 
@@ -302,7 +302,7 @@ public class LocalCache implements Cache {
             return fm.getMetadata(product).getMetadata(metadataElementName);
         } catch (Exception e) {
             throw new CacheException("Failed to get metadata value for "
-                    + metadataElementName + " : " + e.getMessage());
+                    + metadataElementName + " : " + e.getMessage(), e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
index 702b537..f6df8a2 100644
--- a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
+++ b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/ingest/RmiCache.java
@@ -113,7 +113,7 @@ public class RmiCache implements Cache {
         try {
             rmiCacheServer.sync(uniqueElementProductTypeNames);
         } catch (RemoteException e) {
-            throw new CacheException(e.getMessage());
+            throw new CacheException(e.getMessage(), e);
         }
 
     }
@@ -129,7 +129,7 @@ public class RmiCache implements Cache {
         try {
             rmiCacheServer.sync(uniqueElementName, 
uniqueElementProductTypeNames);
         } catch (RemoteException e) {
-           throw new CacheException(e.getMessage());
+           throw new CacheException(e.getMessage(), e);
         }
 
     }
@@ -158,7 +158,7 @@ public class RmiCache implements Cache {
         try {
             rmiCacheServer.sync();
         } catch (RemoteException e) {
-            throw new CacheException(e.getMessage());
+            throw new CacheException(e.getMessage(), e);
         }
     }
 

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CacheException.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CacheException.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CacheException.java
index e3278cb..e4912c2 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CacheException.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CacheException.java
@@ -33,4 +33,9 @@ public class CacheException extends Exception {
     public CacheException(String msg) {
         super(msg);
     }
+
+    public CacheException(String msg, Throwable t) {
+        super(msg, t);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CatalogException.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CatalogException.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CatalogException.java
index 2ac74c0..4e1df88 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CatalogException.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/CatalogException.java
@@ -37,6 +37,11 @@ public class CatalogException extends Exception {
         super(message);
     }
 
+    public CatalogException(Throwable t){
+        super(t);
+
+    }
+
     public CatalogException(String message, Throwable t) {
         super(message, t);
     }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/RepositoryManagerException.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/RepositoryManagerException.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/RepositoryManagerException.java
index e69ed11..2ca0ef6 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/RepositoryManagerException.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/structs/exceptions/RepositoryManagerException.java
@@ -43,5 +43,11 @@ public class RepositoryManagerException extends Exception {
         super(message);
     }
 
+    public RepositoryManagerException(Throwable t){
+        super(t);
+    }
 
+    public RepositoryManagerException(String message, Throwable t) {
+        super(message,t);
+    }
 }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
index a2a0d9b..0be545d 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManager.java
@@ -248,7 +248,7 @@ public class XmlRpcFileManager {
                     "Catalog exception performing paged query for product 
type: ["
                             + type.getProductTypeId() + "] query: [" + query
                             + "]: Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
         return XmlRpcStructFactory.getXmlRpcProductPage(prodPage);
@@ -351,7 +351,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.WARNING,
                     "Exception when getting num products: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
         return numProducts;
@@ -369,7 +369,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.WARNING,
                     "Exception when getting topN products: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
     }
 
@@ -389,7 +389,7 @@ public class XmlRpcFileManager {
                     "Exception when getting topN products by product type: ["
                             + type.getProductTypeId() + "]: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
     }
@@ -426,7 +426,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE,
                     "Unable to obtain product types from repository manager: 
Message: "
                             + e.getMessage());
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e.getMessage(), e);
         }
     }
 
@@ -444,7 +444,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE, "Unable to obtain references for product: ["
                     + product.getProductName() + "]: Message: "
                     + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
     }
@@ -467,13 +467,13 @@ public class XmlRpcFileManager {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "Unable to obtain product by id: ["
                     + productId + "]: Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } catch (RepositoryManagerException e) {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "Unable to obtain product type by id: ["
                     + product.getProductType().getProductTypeId()
                     + "]: Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
 
     }
@@ -496,13 +496,13 @@ public class XmlRpcFileManager {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "Unable to obtain product by name: ["
                     + productName + "]: Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         } catch (RepositoryManagerException e) {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "Unable to obtain product type by id: ["
                     + product.getProductType().getProductTypeId()
                     + "]: Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
     }
 
@@ -521,7 +521,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE,
                     "Exception obtaining products by product type for type: ["
                             + type.getName() + "]: Message: " + 
e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(), e);
         }
     }
 
@@ -540,7 +540,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE,
                     "Exception obtaining elements for product type: ["
                             + type.getName() + "]: Message: " + 
e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e.getMessage(), e);
         }
 
     }
@@ -556,7 +556,7 @@ public class XmlRpcFileManager {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "exception retrieving element by id: ["
                     + elementId + "]: Message: " + e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e.getMessage(), e);
         }
     }
 
@@ -572,7 +572,7 @@ public class XmlRpcFileManager {
             e.printStackTrace();
             LOG.log(Level.SEVERE, "exception retrieving element by name: ["
                     + elementName + "]: Message: " + e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e.getMessage(), e);
         }
     }
 
@@ -631,7 +631,7 @@ public class XmlRpcFileManager {
         } catch (Exception e) {
             e.printStackTrace();
             throw new CatalogException("Failed to perform complex query : "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
     
@@ -664,7 +664,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE,
                     "Exception obtaining product type by id for product type: 
["
                             + productTypeId + "]: Message: " + e.getMessage());
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e.getMessage(), e);
         }
     }
     
@@ -770,7 +770,7 @@ public class XmlRpcFileManager {
     } catch (Exception e) {
       e.printStackTrace();
       throw new CatalogException("Error ingesting product [" + p + "] : "
-          + e.getMessage());
+          + e.getMessage(),e);
     }
 
   }
@@ -900,7 +900,7 @@ public class XmlRpcFileManager {
             try {
                 this.dataTransfer.transferProduct(p);
             } catch (IOException e) {
-                throw new DataTransferException(e.getMessage());
+                throw new DataTransferException(e);
             }
 
             // now delete the original copy
@@ -913,7 +913,7 @@ public class XmlRpcFileManager {
             } catch (URISyntaxException e) {
                 throw new DataTransferException(
                         "URI Syntax exception trying to remove original 
product ref: Message: "
-                                + e.getMessage());
+                                + e.getMessage(), e);
             }
 
             // now save the updated reference
@@ -921,7 +921,7 @@ public class XmlRpcFileManager {
                 this.catalog.modifyProduct(p);
                 return true;
             } catch (CatalogException e) {
-                throw new DataTransferException(e.getMessage());
+                throw new DataTransferException(e.getMessage(),e);
             }
         } else
             throw new UnsupportedOperationException(
@@ -1072,7 +1072,7 @@ public class XmlRpcFileManager {
                     "ingestProduct: General Exception when adding metadata "
                             + metadata + " for product: " + p.getProductName()
                             + ": Message: " + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(),e);
         }
 
         return metadata;
@@ -1169,7 +1169,7 @@ public class XmlRpcFileManager {
             LOG.log(Level.SEVERE,
                     "Exception performing query against catalog for product 
type: ["
                             + productType.getName() + "] Message: " + 
e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(),e);
         }
     }
     
@@ -1189,7 +1189,7 @@ public class XmlRpcFileManager {
                     "Exception obtaining metadata from catalog for product: ["
                             + product.getProductId() + "]: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(),e);
         }
     }
     
@@ -1204,7 +1204,7 @@ public class XmlRpcFileManager {
                     "Exception obtaining metadata from catalog for product: ["
                             + product.getProductId() + "]: Message: "
                             + e.getMessage());
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e.getMessage(),e);
         }
     }
     

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
index eda060e..a4fdf78 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/system/XmlRpcFileManagerClient.java
@@ -232,9 +232,9 @@ public class XmlRpcFileManagerClient {
             success = (Boolean) client.execute("filemgr.transferringProduct",
                 argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         return success;
@@ -253,9 +253,9 @@ public class XmlRpcFileManagerClient {
             success = (Boolean) client.execute(
                 "filemgr.removeProductTransferStatus", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         return success;
@@ -274,9 +274,9 @@ public class XmlRpcFileManagerClient {
             success = (Boolean) client.execute("filemgr.isTransferComplete",
                 argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         return success;
@@ -295,9 +295,9 @@ public class XmlRpcFileManagerClient {
         try {
             success = (Boolean) client.execute("filemgr.moveProduct", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         return success;
@@ -316,9 +316,9 @@ public class XmlRpcFileManagerClient {
             success = (Boolean) client.execute("filemgr.modifyProduct",
                 argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return success;
@@ -338,9 +338,9 @@ public class XmlRpcFileManagerClient {
             success = (Boolean) client.execute("filemgr.removeProduct",
                 argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return success;
@@ -359,9 +359,9 @@ public class XmlRpcFileManagerClient {
             statusHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getCurrentFileTransfer", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         if (statusHash != null) {
@@ -384,9 +384,9 @@ public class XmlRpcFileManagerClient {
             statusVector = (Vector<Hashtable<String, Object>>) client.execute(
                     "filemgr.getCurrentFileTransfers", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         if (statusVector != null) {
@@ -409,9 +409,9 @@ public class XmlRpcFileManagerClient {
             pct = (Double) client.execute("filemgr.getProductPctTransferred",
                     argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         if (pct != null) {
@@ -433,9 +433,9 @@ public class XmlRpcFileManagerClient {
             pct = (Double) client.execute("filemgr.getRefPctTransferred",
                     argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         if (pct != null) {
@@ -463,9 +463,9 @@ public class XmlRpcFileManagerClient {
             pageHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.pagedQuery", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return XmlRpcStructFactory.getProductPageFromXmlRpc(pageHash);
@@ -483,9 +483,9 @@ public class XmlRpcFileManagerClient {
             pageHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getFirstPage", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (pageHash != null) {
@@ -508,9 +508,9 @@ public class XmlRpcFileManagerClient {
             pageHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getLastPage", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (pageHash != null) {
@@ -534,9 +534,9 @@ public class XmlRpcFileManagerClient {
             pageHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getNextPage", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (pageHash != null) {
@@ -560,9 +560,9 @@ public class XmlRpcFileManagerClient {
             pageHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getPrevPage", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (pageHash != null) {
@@ -584,9 +584,9 @@ public class XmlRpcFileManagerClient {
             productTypeId = (String) client.execute("filemgr.addProductType",
                     argList);
         } catch (XmlRpcException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         } catch (IOException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         }
 
         return productTypeId;
@@ -603,9 +603,9 @@ public class XmlRpcFileManagerClient {
             hasProduct = (Boolean) client.execute("filemgr.hasProduct",
                 argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return hasProduct;
@@ -622,9 +622,9 @@ public class XmlRpcFileManagerClient {
             numProducts = (Integer) client.execute("filemgr.getNumProducts",
                     argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return numProducts;
@@ -641,9 +641,9 @@ public class XmlRpcFileManagerClient {
             topNProducts = (Vector<Hashtable<String, Object>>) client.execute(
                     "filemgr.getTopNProducts", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
       return XmlRpcStructFactory
@@ -665,9 +665,9 @@ public class XmlRpcFileManagerClient {
             topNProducts = (Vector<Hashtable<String, Object>>) client.execute(
                     "filemgr.getTopNProducts", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
       return XmlRpcStructFactory
@@ -684,9 +684,9 @@ public class XmlRpcFileManagerClient {
         try {
             client.execute("filemgr.setProductTransferStatus", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
     }
@@ -700,9 +700,9 @@ public class XmlRpcFileManagerClient {
         try {
             client.execute("filemgr.addProductReferences", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
     }
 
@@ -716,9 +716,9 @@ public class XmlRpcFileManagerClient {
     try {
       client.execute("filemgr.addMetadata", argList);
     } catch (XmlRpcException e) {
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e);
     } catch (IOException e) {
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e);
     }
   }
 
@@ -733,9 +733,9 @@ public class XmlRpcFileManagerClient {
     try {
       result = (Boolean) client.execute("filemgr.updateMetadata", argList);
     } catch (XmlRpcException e) {
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e);
     } catch (IOException e) {
-      throw new CatalogException(e.getMessage());
+      throw new CatalogException(e);
     }
 
     return result;
@@ -752,9 +752,9 @@ public class XmlRpcFileManagerClient {
             productId = (String) client.execute("filemgr.catalogProduct",
                     argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         return productId;
@@ -773,9 +773,9 @@ public class XmlRpcFileManagerClient {
             metadata = (Hashtable<String, Object>) client.execute(
                     "filemgr.getMetadata", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         Metadata m = new Metadata();
@@ -799,9 +799,9 @@ public class XmlRpcFileManagerClient {
             metadata = (Hashtable<String, Object>) client.execute(
                     "filemgr.getReducedMetadata", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         Metadata m = new Metadata();
@@ -819,9 +819,9 @@ public class XmlRpcFileManagerClient {
         try {
             success = (Boolean) client.execute("filemgr.removeFile", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
 
         return success;
@@ -837,9 +837,9 @@ public class XmlRpcFileManagerClient {
       try {
          return (byte[]) client.execute("filemgr.retrieveFile", argList);
       } catch (XmlRpcException e) {
-         throw new DataTransferException(e.getMessage());
+         throw new DataTransferException(e);
       } catch (IOException e) {
-         throw new DataTransferException(e.getMessage());
+         throw new DataTransferException(e);
       }
    }
 
@@ -854,9 +854,9 @@ public class XmlRpcFileManagerClient {
         try {
             client.execute("filemgr.transferFile", argList);
         } catch (XmlRpcException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         } catch (IOException e) {
-            throw new DataTransferException(e.getMessage());
+            throw new DataTransferException(e);
         }
     }
 
@@ -874,9 +874,9 @@ public class XmlRpcFileManagerClient {
             productVector = (Vector<Hashtable<String, Object>>) client.execute(
                     "filemgr.getProductsByProductType", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (productVector == null) {
@@ -901,9 +901,9 @@ public class XmlRpcFileManagerClient {
             elementVector = (Vector<Hashtable<String, Object>>) client.execute(
                     "filemgr.getElementsByProductType", argList);
         } catch (XmlRpcException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } catch (IOException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         }
 
         if (elementVector == null) {
@@ -925,9 +925,9 @@ public class XmlRpcFileManagerClient {
             elementHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getElementById", argList);
         } catch (XmlRpcException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } catch (IOException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         }
 
         if (elementHash == null) {
@@ -949,9 +949,9 @@ public class XmlRpcFileManagerClient {
             elementHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getElementByName", argList);
         } catch (XmlRpcException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } catch (IOException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         }
 
         if (elementHash == null) {
@@ -974,9 +974,9 @@ public class XmlRpcFileManagerClient {
             elementHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getElementByName", argList);
         } catch (XmlRpcException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } catch (IOException e) {
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         }
 
         if (elementHash == null) {
@@ -1000,7 +1000,7 @@ public class XmlRpcFileManagerClient {
                     .getQueryResultsFromXmlRpc(queryResultHashVector);
         } catch (Exception e) {
             e.printStackTrace();
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
     }
 
@@ -1022,11 +1022,11 @@ public class XmlRpcFileManagerClient {
                     "filemgr.query", argList);
         } catch (XmlRpcException e) {
             e.printStackTrace();
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
 
         } catch (IOException e) {
             e.printStackTrace();
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (productVector == null) {
@@ -1049,7 +1049,7 @@ public class XmlRpcFileManagerClient {
         } catch (XmlRpcException e) {
             throw new RepositoryManagerException(e.getLocalizedMessage());
         } catch (IOException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         }
 
         if (productTypeHash == null) {
@@ -1070,9 +1070,9 @@ public class XmlRpcFileManagerClient {
             productTypeHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getProductTypeById", argList);
         } catch (XmlRpcException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         } catch (IOException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         }
 
         if (productTypeHash == null) {
@@ -1093,9 +1093,9 @@ public class XmlRpcFileManagerClient {
             productTypeVector = (Vector<Hashtable<String, Object>>) client
                     .execute("filemgr.getProductTypes", argList);
         } catch (XmlRpcException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         } catch (IOException e) {
-            throw new RepositoryManagerException(e.getMessage());
+            throw new RepositoryManagerException(e);
         }
 
         if (productTypeVector == null) {
@@ -1120,9 +1120,9 @@ public class XmlRpcFileManagerClient {
             productReferenceVector = (Vector<Hashtable<String, Object>>) client
                     .execute("filemgr.getProductReferences", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (productReferenceVector == null) {
@@ -1144,9 +1144,9 @@ public class XmlRpcFileManagerClient {
             productHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getProductById", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (productHash == null) {
@@ -1167,9 +1167,9 @@ public class XmlRpcFileManagerClient {
             productHash = (Hashtable<String, Object>) client.execute(
                     "filemgr.getProductByName", argList);
         } catch (XmlRpcException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         } catch (IOException e) {
-            throw new CatalogException(e.getMessage());
+            throw new CatalogException(e);
         }
 
         if (productHash == null) {
@@ -1236,7 +1236,7 @@ public class XmlRpcFileManagerClient {
                                               + "when adding Product 
References for Product : "
                                               + product.getProductName()
                                               + " to RepositoryManager: 
Message: "
-                                              + e.getMessage());
+                                              + e);
                       throw e;
                   }
                 } else {
@@ -1259,14 +1259,14 @@ public class XmlRpcFileManagerClient {
                                         "ingestProduct: 
RepositoryManagerException "
                                                 + "when updating product 
transfer status for Product: "
                                                 + product.getProductName()
-                                                + " Message: " + 
e.getMessage());
+                                                + " Message: " + e);
                         throw e;
                     }
                 } catch (Exception e) {
                     LOG.log(Level.SEVERE,
                             "ingestProduct: DataTransferException when 
transfering Product: "
                                     + product.getProductName() + ": Message: "
-                                    + e.getMessage());
+                                    + e);
                     throw new DataTransferException(e);
                 }
 
@@ -1280,7 +1280,7 @@ public class XmlRpcFileManagerClient {
                 "ingestProduct: VersioningException when versioning Product: "
                         + product.getProductName() + " with Versioner "
                         + product.getProductType().getVersioner()
-                        + ": Message: " + e.getMessage());
+                        + ": Message: " + e);
             throw new VersioningException(e);
         } catch(XmlRpcException e2){
           LOG.log(Level.SEVERE, "Failed to ingest product [ name:" 
+product.getProductName() + "] :" + e2.getMessage() + " -- rolling back 
ingest");
@@ -1298,7 +1298,7 @@ public class XmlRpcFileManagerClient {
         }
         catch (Exception e) {
           LOG.log(Level.SEVERE, "Failed to ingest product [ id: " + 
product.getProductId() +
-                                "/ name:" +product.getProductName() + "] :" + 
e.getMessage() + " -- rolling back ingest");
+                                "/ name:" +product.getProductName() + "] :" + 
e + " -- rolling back ingest");
             try {
                 Vector<Object> argList = new Vector<Object>();
                 Hashtable<String, Object> productHash = XmlRpcStructFactory
@@ -1307,10 +1307,10 @@ public class XmlRpcFileManagerClient {
                 client.execute("filemgr.removeProduct", argList);
             } catch (Exception e1) {
                 LOG.log(Level.SEVERE, "Failed to rollback ingest of product ["
-                        + product + "] : " + e.getMessage());
+                        + product + "] : " + e);
             }
             throw new FileManagerException("Failed to ingest product [" + 
product + "] : "
-                    + e.getMessage());
+                    + e);
         }
 
     }

http://git-wip-us.apache.org/repos/asf/oodt/blob/0c67a330/filemgr/src/main/java/org/apache/oodt/cas/filemgr/validation/DataSourceValidationLayer.java
----------------------------------------------------------------------
diff --git 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/validation/DataSourceValidationLayer.java
 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/validation/DataSourceValidationLayer.java
index 5103d19..189b0af 100644
--- 
a/filemgr/src/main/java/org/apache/oodt/cas/filemgr/validation/DataSourceValidationLayer.java
+++ 
b/filemgr/src/main/java/org/apache/oodt/cas/filemgr/validation/DataSourceValidationLayer.java
@@ -122,7 +122,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback addElement transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
 
             if (rs != null) {
@@ -190,7 +190,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback modifyElement transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
 
             if (statement != null) {
@@ -249,7 +249,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback removeElement transaction. 
Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
             if (statement != null) {
                 try {
@@ -315,7 +315,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback addElementToProductType 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
             if (statement != null) {
                 try {
@@ -382,7 +382,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback removeElementFromProductType 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
             if (statement != null) {
                 try {
@@ -441,7 +441,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback addParentToProductType 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
             if (statement != null) {
                 try {
@@ -500,7 +500,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                         "Unable to rollback removeParentFromProductType 
transaction. Message: "
                                 + e2.getMessage());
             }
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
             if (statement != null) {
                 try {
@@ -563,7 +563,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                 e.printStackTrace();
                 LOG.log(Level.WARNING, "Exception reading elements. Message: "
                         + e.getMessage());
-                throw new ValidationLayerException(e.getMessage());
+                throw new ValidationLayerException(e);
             } finally {
 
                 if (rs != null) {
@@ -620,7 +620,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
                 LOG.log(Level.WARNING,
                         "Exception reading product parent. Message: "
                                 + e.getMessage());
-                throw new ValidationLayerException(e.getMessage());
+                throw new ValidationLayerException(e);
             } finally {
                 if (rs != null) {
                     try {
@@ -683,7 +683,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception reading elements. Message: "
                     + e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
 
             if (rs != null) {
@@ -747,7 +747,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception reading element. Message: "
                     + e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
 
             if (rs != null) {
@@ -811,7 +811,7 @@ public class DataSourceValidationLayer implements 
ValidationLayer {
             e.printStackTrace();
             LOG.log(Level.WARNING, "Exception reading element. Message: "
                     + e.getMessage());
-            throw new ValidationLayerException(e.getMessage());
+            throw new ValidationLayerException(e);
         } finally {
 
             if (rs != null) {

Reply via email to