You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2009/10/27 14:34:17 UTC

svn commit: r830180 - in /incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae: ./ controller/

Author: cwiklik
Date: Tue Oct 27 13:34:17 2009
New Revision: 830180

URL: http://svn.apache.org/viewvc?rev=830180&view=rev
Log:
UIMA-1638 Removed printStackTrace()

Modified:
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/UimaAsThreadFactory.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
    incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java?rev=830180&r1=830179&r2=830180&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/InProcessCache.java Tue Oct 27 13:34:17 2009
@@ -590,7 +590,11 @@
           sequence = aMessageAccessor.getMessageLongProperty(AsynchAEMessage.CasSequence);
         }
       } catch (Exception e) {
-        e.printStackTrace();
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                  "CacheEntry", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_exception__WARNING", new Object[] { e });
+        }
       }
     }
 

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/UimaAsThreadFactory.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/UimaAsThreadFactory.java?rev=830180&r1=830179&r2=830180&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/UimaAsThreadFactory.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/UimaAsThreadFactory.java Tue Oct 27 13:34:17 2009
@@ -21,7 +21,9 @@
 
 import java.util.concurrent.ThreadFactory;
 
+import org.apache.uima.UIMAFramework;
 import org.apache.uima.aae.controller.PrimitiveAnalysisEngineController;
+import org.apache.uima.util.Level;
 import org.springframework.core.task.TaskRejectedException;
 
 /**
@@ -33,6 +35,9 @@
  * 
  */
 public class UimaAsThreadFactory implements ThreadFactory {
+  
+  private static final Class CLASS_NAME = UimaAsThreadFactory.class;
+  
   private PrimitiveAnalysisEngineController controller;
 
   private ThreadGroup theThreadGroup;
@@ -75,13 +80,16 @@
             // TaskExecutor is terminated.
             r.run();
           } catch (Exception e) {
-            // e.printStackTrace();
             return;
           }
         }
       });
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "CacheEntry", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
     }
     return newThread;
   }

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java?rev=830180&r1=830179&r2=830180&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/AggregateAnalysisEngineController_impl.java Tue Oct 27 13:34:17 2009
@@ -514,7 +514,11 @@
     try {
       handleAction(anAction, anEndpointName, anErrorContext);
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "takeAction", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
     }
   }
 
@@ -569,7 +573,11 @@
               // Send reply back to the client. Use internal (non-jms) transport
               transport.getUimaMessageDispatcher(endpoint.getEndpoint()).dispatch(message);
             } catch (Exception e) {
-              e.printStackTrace();
+              if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+                UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                        "collectionProcessComplete", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                        "UIMAEE_exception__WARNING", new Object[] { e });
+              }
             }
           } else {
             getOutputChannel().sendRequest(AsynchAEMessage.CollectionProcessComplete, endpoint);
@@ -606,7 +614,11 @@
   }
 
   public void handleInitializationError(Exception ex) {
-    ex.printStackTrace();
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+              "handleInitializationError", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+              "UIMAEE_exception__WARNING", new Object[] { ex });
+    }
     // Any problems in completeInitialization() is a reason to stop
     notifyListenersWithInitializationStatus(ex);
     super.stop();
@@ -689,7 +701,6 @@
                     "disableDelegates", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                     "UIMAEE_exception__WARNING", new Object[] { ex });
           }
-          ex.printStackTrace();
           if (aCasReferenceId != null) {
             CasStateEntry parentCasCacheEntry = getLocalCache().getTopCasAncestor(aCasReferenceId);
             if (parentCasCacheEntry != null && aDelegateList.size() > 0) {
@@ -711,13 +722,21 @@
         try {
           completeInitialization();
         } catch (ResourceInitializationException ex) {
-          ex.printStackTrace();
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                    "disableDelegates", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                    "UIMAEE_exception__WARNING", new Object[] { ex });
+          }
           handleInitializationError(ex);
           return;
         }
       }
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "disableDelegates", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
       throw new AsynchAEException(e);
     }
 
@@ -863,7 +882,6 @@
 
       } catch (Throwable t) {
         // Any error here is automatic termination
-        t.printStackTrace();
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
           UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "process",
                   UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING",
@@ -981,7 +999,6 @@
                 "abortProcessingCas", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                 "UIMAEE_exception__WARNING", new Object[] { e });
       }
-      e.printStackTrace();
     }
 
     return false;
@@ -1064,7 +1081,6 @@
                   UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING",
                   new Object[] { e });
         }
-        e.printStackTrace();
       } finally {
         // If just handled the delayed step, return as there is nothing else to do
         if (handlingDelayedStep) {
@@ -1116,7 +1132,6 @@
           }
         } catch (Exception ex) {
           // Any error here is automatic termination
-          ex.printStackTrace();
           if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
             UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                     "process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
@@ -1416,7 +1431,7 @@
       parentCASCacheEntry = getInProcessCache().getCacheEntryForCAS(
               casStateEntry.getInputCasReferenceId());
     } catch (Exception ex) {
-      ex.printStackTrace();
+
       if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(
                 Level.INFO,
@@ -1654,7 +1669,11 @@
       if (endpoint != null) {
         map.put(AsynchAEMessage.Endpoint, endpoint);
       }
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "finalStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
       handleError(map, e);
     } finally {
       if (replySentToClient) {
@@ -2031,7 +2050,6 @@
         step = aFlow.next();
       }
     } catch (Exception e) {
-      e.printStackTrace();
       // Any error here is automatic termination
       UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
               "executeFlowStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
@@ -2050,7 +2068,6 @@
                   "executeFlowStep", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                   "UIMAEE_exception__WARNING", new Object[] { e });
         }
-        ex.printStackTrace();
       }
       return;
     }
@@ -2087,7 +2104,6 @@
       }
 
     } catch (Exception e) {
-      e.printStackTrace();
       HashMap map = new HashMap();
       map.put(AsynchAEMessage.Command, AsynchAEMessage.Process);
       map.put(AsynchAEMessage.CasReference, aCasReferenceId);
@@ -2105,7 +2121,11 @@
         transport.getUimaMessageDispatcher(anEndpoint.getEndpoint()).dispatch(message);
 
       } catch (Exception e) {
-        e.printStackTrace();
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                  "dispatch", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_exception__WARNING", new Object[] { e });
+        }
       }
     } else {
       // Check delegate's state before sending it a CAS. The delegate

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java?rev=830180&r1=830179&r2=830180&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/BaseAnalysisEngineController.java Tue Oct 27 13:34:17 2009
@@ -488,7 +488,11 @@
         }
       }
     } catch( Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "getLoadedJars", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
     }
     return loadedJars.toString();
   }
@@ -1699,7 +1703,11 @@
           System.out.println("Service:" + getComponentName() + " Stopped Delegate Transport:"
                   + entry.getKey());
         } catch (Exception e) {
-          e.printStackTrace();
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                    "stopTransportLayer", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                    "UIMAEE_exception__WARNING", new Object[] { e });
+          }
           System.out.println("Exception:" + e.getClass() + " While Stopping Delegate Transport:"
                   + entry.getKey());
         }
@@ -1774,7 +1782,6 @@
           getOutputChannel().sendReply(cause, aCasReferenceId, null, clientEndpoint,
                   clientEndpoint.getCommand());
         } catch (Exception e) {
-          e.printStackTrace();
           if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
             UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "stop",
                     UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING",
@@ -2068,7 +2075,11 @@
           }
         }
       } catch (Exception e) {
-        e.printStackTrace();
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                  "stopCasMultiplier", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_exception__WARNING", new Object[] { e });
+        }
       } finally {
         if (casMultiplier != null) {
           casMultiplier.setGeneratingChildrenFrom(aCasReferenceId, false);
@@ -2282,7 +2293,6 @@
         // If debug level=FINEST dump the entire cache
         getInProcessCache().dumpContents(getComponentName());
       } catch (Exception e) {
-        e.printStackTrace();
         if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
           UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                   "releaseNextCas", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
@@ -2624,7 +2634,11 @@
             message.addStringCargo(bos.toString());
             transport.getUimaMessageDispatcher(anEndpoint.getEndpoint()).dispatch(message);
           } catch (Exception e) {
-            e.printStackTrace();
+            if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+              UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                      "sendMetadata", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                      "UIMAEE_exception__WARNING", new Object[] { e });
+            }
           } finally {
             try {
               bos.close();

Modified: incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java?rev=830180&r1=830179&r2=830180&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-core/src/main/java/org/apache/uima/aae/controller/PrimitiveAnalysisEngineController_impl.java Tue Oct 27 13:34:17 2009
@@ -183,12 +183,20 @@
           try {
             postInitialize();
           } catch (Exception e) {
-            e.printStackTrace();
+            if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+              UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                      "initializeAnalysisEngine", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                      "UIMAEE_exception__WARNING", new Object[] { e });
+            }
             throw new ResourceInitializationException(e);
           }
         }
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "initializeAnalysisEngine", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
       super.notifyListenersWithInitializationStatus(e);
       if (isTopLevelComponent()) {
         super.notifyListenersWithInitializationStatus(e);
@@ -267,13 +275,17 @@
             latch.openLatch(getName(), isTopLevelComponent(), true);
 
           } catch (Exception e) {
-            e.printStackTrace();
+            if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+              UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                      "postInitialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                      "UIMAEE_exception__WARNING", new Object[] { e });
+            }
             throw new AsynchAEException(e);
           }
         } else {
           if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
             UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, getClass().getName(),
-                    "initialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                    "postInitialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                     "UIMAEE_cas_manager_wrapper_notdefined__CONFIG", new Object[] {});
           }
         }
@@ -282,23 +294,21 @@
     } catch (AsynchAEException e) {
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
-                "initialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "postInitialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                 "UIMAEE_exception__WARNING", new Object[] { e });
       }
-      e.printStackTrace();
       throw e;
     } catch (Exception e) {
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
-                "initialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "postInitialize", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
                 "UIMAEE_exception__WARNING", new Object[] { e });
       }
-      e.printStackTrace();
       throw new AsynchAEException(e);
     }
 
     if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "initialize",
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "postInitialize",
               UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_initialized_controller__INFO",
               new Object[] { getComponentName() });
     }
@@ -367,7 +377,6 @@
         try {
           aeInstancePool.checkin(ae);
         } catch (Exception ex) {
-          ex.printStackTrace();
           if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
             UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
                     "collectionProcessComplete", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
@@ -400,7 +409,11 @@
     try {
       parentCasStateEntry = getLocalCache().lookupEntry(aCasReferenceId);
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
       return;
     }
 
@@ -645,7 +658,6 @@
         localCache.remove(aCasReferenceId);
       }
     } catch (Throwable e) {
-      e.printStackTrace();
       processingFailed = true;
       ErrorContext errorContext = new ErrorContext();
       errorContext.add(AsynchAEMessage.CasReference, aCasReferenceId);
@@ -661,7 +673,11 @@
         try {
           aeInstancePool.checkin(ae);
         } catch (Exception e) {
-          e.printStackTrace();
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                    "process", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                    "UIMAEE_exception__WARNING", new Object[] { e });
+          }
         }
       }
       // drop the CAS if it has been successfully processed. If there was a failure, the Error
@@ -724,7 +740,6 @@
         super.handleAction(anAction, anEndpointName, anErrorContext);
       }
     } catch (Exception e) {
-      e.printStackTrace();
       if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
         UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
                 "takeAction", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
@@ -787,7 +802,11 @@
       try {
         aeInstancePool.destroy();
       } catch (Exception e) {
-        e.printStackTrace();
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                  "stop", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                  "UIMAEE_exception__WARNING", new Object[] { e });
+        }
       }
     }
     try {
@@ -795,7 +814,11 @@
         transport.getValue().stopIt();
       }
     } catch (Exception e) {
-      e.printStackTrace();
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, getClass().getName(),
+                "stop", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE,
+                "UIMAEE_exception__WARNING", new Object[] { e });
+      }
     }
 
     if (cmOutstandingCASes != null) {