ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r683350 - in /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl: AnnotationBuilder.java ArtifactProcessor.java
Date Wed, 06 Aug 2008 18:15:46 GMT
Author: scheu
Date: Wed Aug  6 11:15:45 2008
New Revision: 683350

URL: http://svn.apache.org/viewvc?rev=683350&view=rev
Log:
Quick Fix
Writing exceptions into the debug trace can confuse customers if the Exceptions are part of
a normal and valid
scenario.  This fix corrects the debug trace for AnnotationBuilder and ArtifactProcessor

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java?rev=683350&r1=683349&r2=683350&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/AnnotationBuilder.java
Wed Aug  6 11:15:45 2008
@@ -298,9 +298,9 @@
             //does not extend Exception, so lets catch everything that extends Throwable
             //rather than just Exception.
         } catch (Throwable e) {
-            // TODO Should the exception be swallowed ?
+            // Depending on the jaxws scenario, it is normal that some classes are not available.
             if (log.isDebugEnabled()) {
-                log.debug("PackageSetBuilder cannot load the following class:" + className);
+                log.debug("AnnotationBuilder did not find the following class:" + className);
             }
         }
         return null;
@@ -325,9 +325,9 @@
             //does not extend Exception, so lets catch everything that extends Throwable
             //rather than just Exception.
         } catch (Throwable e) {
-            // TODO Should the exception be swallowed ?
+            // Depending on the jaxws scenario, it is normal that some classes are not available.
             if (log.isDebugEnabled()) {
-                log.debug("PackageSetBuilder cannot load the following class:" + className);
+                log.debug("AnnotationBuilder did not find the following class:" + className);
             }
         }
         return null;
@@ -356,9 +356,15 @@
                     }
             );
         } catch (PrivilegedActionException e) {
+            /* An exception should NOT be logged.  Depending on the JAXWS scenario, certain
classes 
+             * may or may not exist.  Putting an exception in the log will confuse programmers
who
+             * are servicing the product
+             * 
+             
             if (log.isDebugEnabled()) {
                 log.debug("Exception thrown from AccessController: " + e);
             }
+            */
             throw (ClassNotFoundException)e.getException();
         }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java?rev=683350&r1=683349&r2=683350&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/runtime/description/marshal/impl/ArtifactProcessor.java
Wed Aug  6 11:15:45 2008
@@ -286,9 +286,8 @@
      */
     private String missingArtifact(String artifactName) {
 
-        // TODO Could we contstruct a proxy of the artifact at this point ?
         if (log.isDebugEnabled()) {
-            log.debug("The following class is missing: " + artifactName + " Processing continues.");
+            log.debug("The following class was not found: " + artifactName + " Processing
continues without this class.");
         }
         return null;
     }
@@ -376,19 +375,22 @@
                         		//Lets catch NoClassDefFoundError as its part of Throwable
                         		//Any Exception that extends Exception will be handled by doPriv
method.    
                         	} catch (NoClassDefFoundError e) {
-                        		// TODO Should the exception be swallowed ?
-                        		if (log.isDebugEnabled()) {
-                        			log.debug("ArtifactProcessor cannot load the following class NoClassDefFoundError:"
+ className);
-                        		}
-                        	}
+                        	    /**
+                        	     * In different jaxws scenarios, some classes may be missing.
 So it is normal behavior
+                        	     * to get to this point.  The exception is swallowed and a null
is returned.  
+                        	     * The exception is not logged...as this would give servicability
folks the idea that a problem occurred.
+                        	     */
+                        	} 
                         	return cls;
                         }
                     }
             );
         } catch (PrivilegedActionException e) {
-            if (log.isDebugEnabled()) {
-                log.debug("Exception thrown from AccessController: " + e);
-            }
+            /**
+             * In different jaxws scenarios, some classes may be missing.  So it is normal
behavior
+             * to get to this point. 
+             * The exception is not logged...as this would give servicability folks the idea
that a problem occurred.
+             */
             throw (ClassNotFoundException)e.getException();
         }
 



Mime
View raw message