geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickmcgu...@apache.org
Subject svn commit: r547376 - in /geronimo/server/trunk: applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/ applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/ modules/gero...
Date Thu, 14 Jun 2007 19:38:14 GMT
Author: rickmcguire
Date: Thu Jun 14 12:38:13 2007
New Revision: 547376

URL: http://svn.apache.org/viewvc?view=rev&rev=547376
Log:
GERONIMO-3246 Cleanup exception handling so stack traces for first failures are not discarded.


Modified:
    geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesFileLoginModuleNoCache.java
    geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesLoginModuleManager.java
    geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
    geronimo/server/trunk/modules/geronimo-activation/src/main/java/org/apache/geronimo/activation/handlers/AbstractImageHandler.java
    geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/TransportConnectorGBeanImpl.java
    geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/AxisServiceReference.java
    geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/SEIFactoryImpl.java
    geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/server/POJOProvider.java

Modified: geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesFileLoginModuleNoCache.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesFileLoginModuleNoCache.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesFileLoginModuleNoCache.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesFileLoginModuleNoCache.java
Thu Jun 14 12:38:13 2007
@@ -104,13 +104,13 @@
                     MessageDigest.getInstance(digest);
                 } catch(NoSuchAlgorithmException e) {
                     log.error("Initialization failed. Digest algorithm "+digest+" is not
available.", e);
-                    throw new IllegalArgumentException("Unable to configure properties file
login module: "+e.getMessage());
+                    throw new IllegalArgumentException("Unable to configure properties file
login module: "+e.getMessage(), e);
                 }
             }
         } catch (Exception e) {
             log.error(e);
             throw new IllegalArgumentException(
-                    "Unable to configure properties file login module: " + e);
+                    "Unable to configure properties file login module: " + e.getMessage(),
e);
         }
     }
 
@@ -149,7 +149,7 @@
 
         } catch (Exception e) {
             log.error("Properties File Login Module - data load failed", e);
-            throw new GeronimoSecurityException(e);
+            throw new GeronimoSecurityException("Properties File Login Module - data load
failed", e);
         }
     }
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesLoginModuleManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesLoginModuleManager.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesLoginModuleManager.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/core/security/PropertiesLoginModuleManager.java
Thu Jun 14 12:38:13 2007
@@ -161,7 +161,7 @@
             store(users, serverInfo.resolveServer(getUsersURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException("Cannot add user principal: "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 
@@ -173,7 +173,7 @@
             store(users, serverInfo.resolveServer(getUsersURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException("Cannot remove user principal "
-                    + userPrincipal + ": " + e.getMessage());
+                    + userPrincipal + ": " + e.getMessage(), e);
         }
     }
 
@@ -192,7 +192,7 @@
             store(users, serverInfo.resolveServer(getUsersURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException("Cannot add user principal: "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 
@@ -209,7 +209,7 @@
             store(groups, serverInfo.resolveServer(getGroupsURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException("Cannot add group principal: "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 
@@ -221,7 +221,7 @@
             store(groups, serverInfo.resolveServer(getGroupsURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException(
-                    "Cannot remove group principal: " + e.getMessage());
+                    "Cannot remove group principal: " + e.getMessage(), e);
         }
     }
 
@@ -235,7 +235,7 @@
             store(groups, serverInfo.resolveServer(getGroupsURI()).toURL());
         } catch (Exception e) {
             throw new GeronimoSecurityException("Cannot add group principal: "
-                    + e.getMessage());
+                    + e.getMessage(), e);
         }
     }
 

Modified: geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
(original)
+++ geronimo/server/trunk/applications/console/geronimo-console-core/src/main/java/org/apache/geronimo/console/util/KernelManagementHelper.java
Thu Jun 14 12:38:13 2007
@@ -504,7 +504,7 @@
                 // we just got this list so this should not happen
                 // in the unlikely event it does, just continue
             } catch (InvalidConfigException e) {
-                throw new RuntimeException("Bad configID; should never happen");
+                throw new RuntimeException("Bad configID; should never happen", e);
             }
         }
         Collections.sort(results);
@@ -541,7 +541,7 @@
             }
             return (J2EEDeployedObject) kernel.getProxyManager().createProxy(result, getClass().getClassLoader());
         } catch (GBeanNotFoundException e) {
-            throw new IllegalStateException("Bad config ID: " + e.getMessage());
+            throw new IllegalStateException("Bad config ID: " + e.getMessage(), e);
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-activation/src/main/java/org/apache/geronimo/activation/handlers/AbstractImageHandler.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-activation/src/main/java/org/apache/geronimo/activation/handlers/AbstractImageHandler.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-activation/src/main/java/org/apache/geronimo/activation/handlers/AbstractImageHandler.java
(original)
+++ geronimo/server/trunk/modules/geronimo-activation/src/main/java/org/apache/geronimo/activation/handlers/AbstractImageHandler.java
Thu Jun 14 12:38:13 2007
@@ -54,7 +54,7 @@
     public Object getContent(DataSource ds) throws IOException {
         Iterator i = ImageIO.getImageReadersByMIMEType(ds.getContentType());
         if (!i.hasNext()) {
-            throw new UnsupportedDataTypeException();
+            throw new UnsupportedDataTypeException("Unknown image type " + ds.getContentType());
         }
         ImageReader reader = (ImageReader) i.next();
         return reader.read(0);
@@ -63,7 +63,7 @@
     public void writeTo(Object obj, String mimeType, OutputStream os) throws IOException
{
         Iterator i = ImageIO.getImageWritersByMIMEType(mimeType);
         if (!i.hasNext()) {
-            throw new UnsupportedDataTypeException();
+            throw new UnsupportedDataTypeException("Unknown image type " + mimeType);
         }
         ImageWriter writer = (ImageWriter) i.next();
         writer.setOutput(os);
@@ -80,7 +80,7 @@
             graphics.drawImage(image, 0, 0, null, null);
             writer.write(new IIOImage(buffered.getRaster(), null, null));
         } else {
-            throw new UnsupportedDataTypeException();
+            throw new UnsupportedDataTypeException("Unknown image type " + obj.getClass().getName());
         }
         os.flush();
     }

Modified: geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/TransportConnectorGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/TransportConnectorGBeanImpl.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/TransportConnectorGBeanImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-activemq/src/main/java/org/apache/geronimo/activemq/TransportConnectorGBeanImpl.java
Thu Jun 14 12:38:13 2007
@@ -101,7 +101,7 @@
         try {
             return new URI(protocol, null, host, port, path, query, null).toString();
         } catch (URISyntaxException e) {
-            throw new IllegalStateException("Attributes don't form a valid URI: "+protocol+"://"+host+":"+port+"/"+path+"?"+query);
+            throw new IllegalStateException("Attributes don't form a valid URI: "+protocol+"://"+host+":"+port+"/"+path+"?"+query,
e);
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/AxisServiceReference.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/AxisServiceReference.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/AxisServiceReference.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/AxisServiceReference.java
Thu Jun 14 12:38:13 2007
@@ -59,7 +59,7 @@
         try {
             serviceInterface = classLoader.loadClass(serviceInterfaceClassName);
         } catch (ClassNotFoundException e) {
-            throw new NamingException("Could not load service interface class " + serviceInterfaceClassName);
+            throw (NamingException)new NamingException("Could not load service interface
class " + serviceInterfaceClassName).initCause(e);
         }
         Object serviceInstance = createServiceInterfaceProxy(serviceInterface, seiPortNameToFactoryMap,
seiClassNameToFactoryMap, classLoader);
         for (Iterator iterator = seiPortNameToFactoryMap.values().iterator(); iterator.hasNext();)
{
@@ -67,7 +67,7 @@
             try {
                 seiFactory.initialize(serviceInstance, classLoader);
             } catch (ClassNotFoundException e) {
-                throw new NamingException("Could not load service interface class; " + e.getMessage());
+                throw (NamingException)new NamingException("Could not load service interface
class; " + e.getMessage()).initCause(e);
             }
         }
 

Modified: geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/SEIFactoryImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/SEIFactoryImpl.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/SEIFactoryImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/client/SEIFactoryImpl.java
Thu Jun 14 12:38:13 2007
@@ -151,7 +151,7 @@
             return (Remote) constructor.newInstance(new Object[]{serviceEndpoint});
         } catch (InvocationTargetException e) {
             e.getTargetException().printStackTrace();
-            throw new ServiceException("Could not construct service instance", e.getTargetException());
+            throw (ServiceException)new ServiceException("Could not construct service instance",
e.getTargetException()).initCause(e);
         }
     }
 

Modified: geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/server/POJOProvider.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/server/POJOProvider.java?view=diff&rev=547376&r1=547375&r2=547376
==============================================================================
--- geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/server/POJOProvider.java
(original)
+++ geronimo/server/trunk/modules/geronimo-axis/src/main/java/org/apache/geronimo/axis/server/POJOProvider.java
Thu Jun 14 12:38:13 2007
@@ -44,7 +44,7 @@
         try {
             pojoMethod = pojoClass.getMethod(interfaceMethod.getName(), interfaceMethod.getParameterTypes());
         } catch (NoSuchMethodException e) {
-            throw new NoSuchMethodException("The pojo class '"+pojoClass.getName()+"' does
not have a method matching signature: "+interfaceMethod);
+            throw (NoSuchMethodException)new NoSuchMethodException("The pojo class '"+pojoClass.getName()+"'
does not have a method matching signature: "+interfaceMethod).initCause(e);
         }
 
         return pojoMethod.invoke(pojo, arguments);



Mime
View raw message