svn commit: r1818921 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/ applications/content/s...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1818921 - in /ofbiz/ofbiz-framework/trunk: applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/ applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/ applications/content/s...

mbrohl
Author: mbrohl
Date: Thu Dec 21 12:33:04 2017
New Revision: 1818921

URL: http://svn.apache.org/viewvc?rev=1818921&view=rev
Log:
Improved: Replace all "e.printStackTrace();" by calls to the Debug class.
(OFBIZ-10083)

Thanks Jacques Le Roux for reporting and Kyra Pritzel-Hentley
for providing the patches.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
    ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java
    ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ConvertTree.java
    ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreEvents.java
    ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelServiceReader.java
    ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java
    ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java

Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/orbital/OrbitalPaymentServices.java Thu Dec 21 12:33:04 2017
@@ -72,8 +72,7 @@ public class OrbitalPaymentServices {
         try {
             request = new Request(RequestIF.NEW_ORDER_TRANSACTION);
         } catch (InitializationException e) {
-            Debug.logError("Error in request initialization", module);
-            e.printStackTrace();
+            Debug.logError(e, "Error in request initialization", module);
         }
         buildAuthOrAuthCaptureTransaction(context, delegator, props, request, results);
         Map<String, Object> validateResults = validateRequest(context, props, request);
@@ -99,8 +98,7 @@ public class OrbitalPaymentServices {
         try {
             request = new Request(RequestIF.NEW_ORDER_TRANSACTION);
         } catch (InitializationException e) {
-            Debug.logError("Error in request initialization", module);
-            e.printStackTrace();
+            Debug.logError(e, "Error in request initialization", module);
         }
         buildAuthOrAuthCaptureTransaction(context, delegator, props, request, results);
         Map<String, Object> validateResults = validateRequest(context, props, request);
@@ -145,8 +143,7 @@ public class OrbitalPaymentServices {
         try {
             request = new Request(RequestIF.MARK_FOR_CAPTURE_TRANSACTION);
         } catch (InitializationException e) {
-            Debug.logError("Error in request initialization", module);
-            e.printStackTrace();
+            Debug.logError(e, "Error in request initialization", module);
         }
         buildCaptureTransaction(context, delegator, props, request, results);
         Map<String, Object> validateResults = validateRequest(context, props, request);
@@ -190,8 +187,7 @@ public class OrbitalPaymentServices {
         try {
             request = new Request(RequestIF.NEW_ORDER_TRANSACTION);
         } catch (InitializationException e) {
-            Debug.logError("Error in request initialization", module);
-            e.printStackTrace();
+            Debug.logError(e, "Error in request initialization", module);
         }
         buildRefundTransaction(context, props, request, results);
         Map<String, Object> validateResults = validateRequest(context, props, request);
@@ -234,8 +230,7 @@ public class OrbitalPaymentServices {
         try {
             request = new Request(RequestIF.REVERSE_TRANSACTION);
         } catch (InitializationException e) {
-            Debug.logError("Error in request initialization", module);
-            e.printStackTrace();
+            Debug.logError(e, "Error in request initialization", module);
         }
         buildReleaseTransaction(context, delegator, props, request, results);
         Map<String, Object> validateResults = validateRequest(context, props, request);
@@ -278,8 +273,7 @@ public class OrbitalPaymentServices {
             buildConfiguratorContext.putAll(config.getConfigurations());
             config.setConfigurations(buildConfiguratorContext);
         } catch (InitializationException e) {
-            Debug.logError("Orbital Configurator Initialization Error: " + e.getMessage(), module);
-            e.printStackTrace();
+            Debug.logError(e, "Orbital Configurator Initialization Error: " + e.getMessage(), module);
         }
         return buildConfiguratorContext;
     }
@@ -380,7 +374,7 @@ public class OrbitalPaymentServices {
         } catch (FieldNotFoundException fnfe) {
             Debug.logError("Unable to find XML field in template", module);
         } catch (Exception e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
     }
 
@@ -419,7 +413,7 @@ public class OrbitalPaymentServices {
         } catch (FieldNotFoundException fnfe) {
             Debug.logError("Unable to find XML field in template" + fnfe.getMessage(), module);
         } catch (Exception e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
     }
 
@@ -451,7 +445,7 @@ public class OrbitalPaymentServices {
         } catch (FieldNotFoundException fnfe) {
             Debug.logError("Unable to find XML field in template", module);
         } catch (Exception e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
     }
 
@@ -475,7 +469,7 @@ public class OrbitalPaymentServices {
         } catch (FieldNotFoundException fnfe) {
             Debug.logError("Unable to find XML field in template" + fnfe.getMessage(), module);
         } catch (Exception e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
     }
 
@@ -641,7 +635,7 @@ public class OrbitalPaymentServices {
             }
         } catch (GenericEntityException e) {
             Debug.logError("Shipping Ref not found returning empty string", module);
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
         return shippingRef;
     }

Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/src/main/java/org/apache/ofbiz/accounting/thirdparty/securepay/SecurePayPaymentServices.java Thu Dec 21 12:33:04 2017
@@ -308,7 +308,7 @@ public class SecurePayPaymentServices {
                     .queryFirst();
             referenceNum = paymentGatewayResponse != null ? paymentGatewayResponse.get("referenceNum") : authTransaction.getString("referenceNum");
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
 
         Properties props = buildScProperties(context, delegator);

Modified: ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ConvertTree.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ConvertTree.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ConvertTree.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/content/src/main/java/org/apache/ofbiz/content/ConvertTree.java Thu Dec 21 12:33:04 2017
@@ -358,12 +358,10 @@ In order to make this service active add
         } catch (GenericEntityException e) {
             errMsg = "GenericEntityException "+ UtilMisc.toMap("errMessage", e.toString());
             Debug.logError(e, errMsg, module);
-            e.printStackTrace();
             return ServiceUtil.returnError(errMsg);
         } catch (GenericServiceException e) {
             errMsg = "GenericServiceException"+ UtilMisc.toMap("errMessage", e.toString());
             Debug.logError(e, errMsg, module);
-            e.printStackTrace();
             return ServiceUtil.returnError(errMsg);
         }
     }

Modified: ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/humanres/src/main/java/org/apache/ofbiz/humanres/HumanResEvents.java Thu Dec 21 12:33:04 2017
@@ -63,7 +63,7 @@ public class HumanResEvents {
         try {
             categoryList.addAll(getCurrentEmployeeDetails(paramMap));
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             return "error";
         }
 
@@ -78,7 +78,7 @@ public class HumanResEvents {
                 categoryList.addAll(getEmployeeInComp(paramMap));
             }
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             return "error";
         }
         request.setAttribute("hrTree", categoryList);
@@ -153,7 +153,7 @@ public class HumanResEvents {
                 }
             }
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             throw new GenericEntityException(e);
         }
 
@@ -246,7 +246,7 @@ public class HumanResEvents {
                 }  
             }
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             throw new GenericEntityException(e);
         }
 

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareServices.java Thu Dec 21 12:33:04 2017
@@ -23,6 +23,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.entity.GenericValue;
 import org.apache.ofbiz.service.DispatchContext;
 import org.apache.ofbiz.service.ModelService;
@@ -33,6 +34,8 @@ import com.ibm.icu.math.BigDecimal;
  * TaxwareServices
  */
 public class TaxwareServices {
+    
+    public static final String module = TaxwareServices.class.getName();
 
     public static Map calcTax(DispatchContext dctx, Map context) {
         Map result = new HashMap();
@@ -73,7 +76,7 @@ public class TaxwareServices {
             result.put("itemAdjustments", utl.getItemAdjustments());
 
         } catch (TaxwareException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
             result.put(ModelService.ERROR_MESSAGE, "ERROR: Taxware problem (" + e.getMessage() + ").");
         }

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/thirdparty/taxware/TaxwareUTL.java Thu Dec 21 12:33:04 2017
@@ -124,14 +124,14 @@ public class TaxwareUTL {
             try {
                 fos = new FileOutputStream(outFile);
             } catch (FileNotFoundException e) {
-                e.printStackTrace();
+                Debug.logError(e, module);
             }
             outHead.writeDataFile(fos);
             outItem.writeDataFile(fos);
             try {
                 fos.close();
             } catch (IOException e) {
-                e.printStackTrace();
+                Debug.logError(e, module);
             }
 
             outItem.writeDataFile("TaxwareTest.in");

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy Thu Dec 21 12:33:04 2017
@@ -21,6 +21,8 @@ import org.apache.ofbiz.base.util.*
 import org.apache.ofbiz.base.util.string.*
 import org.apache.ofbiz.entity.util.EntityUtilProperties
 
+module = "EditCategory.groovy"
+
 if (productCategory) {
     context.productCategoryType = productCategory.getRelatedOne("ProductCategoryType", false)
 }
@@ -108,7 +110,7 @@ if (fileType) {
             }
             file.renameTo(file1)
         } catch (Exception e) {
-            e.printStackTrace()
+            Debug.logError(e, module)
         }
 
         if (imageUrl) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy Thu Dec 21 12:33:04 2017
@@ -22,6 +22,8 @@ import org.apache.ofbiz.base.util.string
 import org.apache.ofbiz.entity.*
 import org.apache.ofbiz.entity.util.EntityUtilProperties
 
+module = "EditProductConfigItemContent.groovy"
+
 // make the image file formats
 context.tenantId = delegator.getDelegatorTenantId()
 imageFilenameFormat = "configitems/${configItemId}"
@@ -118,7 +120,7 @@ if (fileType) {
             }
             file.renameTo(file1)
         } catch (Exception e) {
-            e.printStackTrace()
+            Debug.logError(e, module)
         }
 
         if (imageUrl) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy Thu Dec 21 12:33:04 2017
@@ -24,6 +24,8 @@ import org.apache.ofbiz.entity.util.Enti
 import org.apache.ofbiz.product.image.ScaleImage
 import org.apache.ofbiz.entity.condition.*
 
+module = "ImageUpload.groovy"
+
 context.nowTimestampString = UtilDateTime.nowTimestamp().toString()
 
 // make the image file formats
@@ -121,7 +123,7 @@ if (fileType) {
             }
             file.renameTo(file1)
         } catch (Exception e) {
-            e.printStackTrace()
+            Debug.logError(e, module)
         }
 
         if (imageUrl && imageUrl.length() > 0) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy Thu Dec 21 12:33:04 2017
@@ -31,6 +31,8 @@ import org.apache.ofbiz.base.util.*
 import org.apache.ofbiz.base.util.string.*
 import org.apache.ofbiz.product.image.ScaleImage
 
+module = "SetDefaultImage.groovy"
+
 context.nowTimestampString = UtilDateTime.nowTimestamp().toString()
 
 imageManagementPath = FlexibleStringExpander.expandString(EntityUtilProperties.getPropertyValue("catalog", "image.management.path", delegator), context)
@@ -159,7 +161,7 @@ if (fileType) {
             }
             file.renameTo(file1)
         } catch (Exception e) {
-            e.printStackTrace()
+            Debug.logError(e, module)
         }
 
         if (imageUrl && imageUrl.length() > 0) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy Thu Dec 21 12:33:04 2017
@@ -23,6 +23,8 @@ import org.apache.ofbiz.base.util.string
 import org.apache.ofbiz.entity.util.EntityUtilProperties
 import org.apache.ofbiz.product.image.ScaleImage
 
+module = "EditProductContent.groovy"
+
 context.nowTimestampString = UtilDateTime.nowTimestamp().toString()
 
 // make the image file formats
@@ -138,7 +140,7 @@ if (fileType) {
             }
             file.renameTo(file1)
         } catch (Exception e) {
-            e.printStackTrace()
+            Debug.logError(e, module)
         }
 
         if (imageUrl && imageUrl.length() > 0) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/inventory/InventoryServices.java Thu Dec 21 12:33:04 2017
@@ -866,7 +866,7 @@ public class InventoryServices {
         try {
             product = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne();
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
         if (product != null) {
             if (EntityTypeUtil.hasParentType(delegator, "ProductType", "productTypeId", product.getString(
@@ -874,13 +874,13 @@ public class InventoryServices {
                 try {
                     resultOutput = dispatcher.runSync("getMktgPackagesAvailable", contextInput);
                 } catch (GenericServiceException e) {
-                    e.printStackTrace();
+                    Debug.logError(e, module);
                 }
             } else {
                 try {
                     resultOutput = dispatcher.runSync("getInventoryAvailableByFacility", contextInput);
                 } catch (GenericServiceException e) {
-                    e.printStackTrace();
+                    Debug.logError(e, module);
                 }
             }
             // filter for quantities
@@ -909,7 +909,7 @@ public class InventoryServices {
         try {
             productPrices = EntityQuery.use(delegator).from("ProductPrice").where("productId",productId).orderBy("-fromDate").cache(true).queryList();
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
         }
         //change this for product price
         if(productPrices != null) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java Thu Dec 21 12:33:04 2017
@@ -397,10 +397,10 @@ public class ProductServices {
             result.put("product", mainProduct);
             result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_SUCCESS);
         } catch (GenericEntityException e) {
-            e.printStackTrace();
             Map<String, String> messageMap = UtilMisc.toMap("errMessage", e.getMessage());
             errMsg = UtilProperties.getMessage(resourceError,
                     "productservices.problems_reading_product_entity", messageMap, locale);
+            Debug.logError(e, errMsg, module);
             result.put(ModelService.RESPONSE_MESSAGE, ModelService.RESPOND_ERROR);
             result.put(ModelService.ERROR_MESSAGE, errMsg);
         }

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreEvents.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreEvents.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreEvents.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/store/ProductStoreEvents.java Thu Dec 21 12:33:04 2017
@@ -26,6 +26,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.base.util.UtilValidate;
 import org.apache.ofbiz.entity.Delegator;
@@ -86,7 +87,7 @@ public class ProductStoreEvents {
                 }
             }
         } catch (GenericEntityException e) {
-            e.printStackTrace();
+            Debug.logError(e, module);
             return "error";
         }
         return "success";

Modified: ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/shipment/thirdparty/usps/UspsServices.java Thu Dec 21 12:33:04 2017
@@ -1045,7 +1045,7 @@ public class UspsServices {
                 try {
                     weight = new BigDecimal(weightStr);
                 } catch (NumberFormatException nfe) {
-                    nfe.printStackTrace(); // TODO: handle exception
+                    Debug.logError(nfe, module); // TODO: handle exception
                 }
 
                 String weightUomId = shipmentPackage.getString("weightUomId");
@@ -1146,7 +1146,7 @@ public class UspsServices {
                 try {
                     postage = new BigDecimal(postageString);
                 } catch (NumberFormatException nfe) {
-                    nfe.printStackTrace(); // TODO: handle exception
+                    Debug.logError(nfe, module); // TODO: handle exception
                 }
                 actualTransportCost = actualTransportCost.add(postage);
 
@@ -1350,7 +1350,7 @@ public class UspsServices {
                 try {
                     weight = new BigDecimal(weightStr);
                 } catch (NumberFormatException nfe) {
-                    nfe.printStackTrace(); // TODO: handle exception
+                    Debug.logError(nfe, module); // TODO: handle exception
                 }
 
                 String weightUomId = shipmentPackage.getString("weightUomId");

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/concurrent/ExecutionPool.java Thu Dec 21 12:33:04 2017
@@ -112,7 +112,7 @@ public final class ExecutionPool {
                     delayQueue.take().run();
                 }
             } catch (InterruptedException e) {
-                e.printStackTrace();
+                Debug.logError(e, module);
             }
         }
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java Thu Dec 21 12:33:04 2017
@@ -889,7 +889,6 @@ public class DatabaseUtil {
                     Object result = detection.method.invoke(dbData, detection.params);
                     Debug.logInfo(String.format(goodFormatStr, detection.name, result, requiredFlag), module);
                 } catch (Exception e) {
-                    e.printStackTrace();
                     Debug.logVerbose(e, module);
                     Debug.logWarning(String.format(badFormatStr, detection.name, requiredFlag), module);
                 }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/transaction/TransactionUtil.java Thu Dec 21 12:33:04 2017
@@ -1007,7 +1007,7 @@ public final class TransactionUtil imple
                     TransactionUtil.commit(tx);
                 } else {
                     if (printException) {
-                        transactionAbortCause.printStackTrace();
+                        Debug.logError(transactionAbortCause, module);
                     }
                     TransactionUtil.rollback(tx, ifErrorMessage, transactionAbortCause);
                 }

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelServiceReader.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelServiceReader.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelServiceReader.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/ModelServiceReader.java Thu Dec 21 12:33:04 2017
@@ -361,7 +361,9 @@ public class ModelServiceReader implemen
             groupElement.setAttribute("name", "_" + service.name + ".group");
             service.internalGroup = new GroupModel(groupElement);
             service.invoke = service.internalGroup.getGroupName();
-            if (Debug.verboseOn()) Debug.logVerbose("Created INTERNAL GROUP model [" + service.internalGroup + "]", module);
+            if (Debug.verboseOn()) {
+                Debug.logVerbose("Created INTERNAL GROUP model [" + service.internalGroup + "]", module);
+            }
         }
     }
 
@@ -475,7 +477,9 @@ public class ModelServiceReader implemen
             // default value
             String defValue = attribute.getAttribute("default-value");
             if (UtilValidate.isNotEmpty(defValue)) {
-                if (Debug.verboseOn()) Debug.logVerbose("Got a default-value [" + defValue + "] for service attribute [" + service.name + "." + param.name + "]", module);
+                if (Debug.verboseOn()) {
+                    Debug.logVerbose("Got a default-value [" + defValue + "] for service attribute [" + service.name + "." + param.name + "]", module);
+                }
                 param.setDefaultValue(defValue.intern());
             }
 
@@ -703,11 +707,9 @@ public class ModelServiceReader implemen
                 x = sxe.getException();
             }
             x.printStackTrace();
-        } catch (ParserConfigurationException pce) {
+        } catch (ParserConfigurationException | IOException e) {
             // Parser with specified options can't be built
-            pce.printStackTrace();
-        } catch (IOException ioe) {
-            ioe.printStackTrace();
+            Debug.logError(e, module);
         }
 
         return document;

Modified: ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webtools/src/main/java/org/apache/ofbiz/webtools/labelmanager/LabelManagerFactory.java Thu Dec 21 12:33:04 2017
@@ -228,7 +228,7 @@ public class LabelManagerFactory {
                         label = new LabelInfo(key, keyComment, fileName, localeName, localeValue, localeComment);
                         labels.put(key + keySeparator + fileName, label);
                     } catch (Exception e) {
-                        e.printStackTrace();
+                        Debug.logError(e, module);;
                     }
                 } else {
                     label.setLabelKeyComment(keyComment);

Modified: ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java?rev=1818921&r1=1818920&r2=1818921&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/html/HtmlTreeRenderer.java Thu Dec 21 12:33:04 2017
@@ -26,6 +26,7 @@ import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.StringUtil;
 import org.apache.ofbiz.base.util.UtilGenerics;
 import org.apache.ofbiz.base.util.UtilValidate;
@@ -342,7 +343,7 @@ public class HtmlTreeRenderer extends Ht
                 try {
                     screenStringRenderer = new MacroScreenRenderer(modelTheme.getType("screen"), modelTheme.getScreenRendererLocation("screen"));
                 } catch (TemplateException | IOException e) {
-                    e.printStackTrace();
+                    Debug.logError(e, module);
                 }
             }
         }