You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ng...@apache.org on 2007/02/14 21:28:05 UTC

svn commit: r507681 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java

Author: ngallardo
Date: Wed Feb 14 12:28:04 2007
New Revision: 507681

URL: http://svn.apache.org/viewvc?view=rev&rev=507681
Log:
AXIS2-2160
Contributor: Lasantha Ranaweera

Patch to clean up logging issues.

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java?view=diff&rev=507681&r1=507680&r2=507681
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/message/databinding/JAXBUtils.java Wed Feb 14 12:28:04 2007
@@ -207,11 +207,13 @@
         // Invalid packages are removed from the list
         it = contextPackages.iterator();
         boolean contextConstruction = true;
+        boolean isJAXBFound = false;
         while(it.hasNext()) {
             String p = it.next();
             // See if this package has an ObjectFactory or package-info
             if (checkPackage(p, cl)) {
                 // Flow to here indicates package can be used for CONTEXT construction
+            	isJAXBFound = true;
                 if (log.isDebugEnabled()) {
                     log.debug("Package " + p + " contains an ObjectFactory or package-info class.");
                 }
@@ -238,6 +240,10 @@
             }
         }
         
+        if(!isJAXBFound){
+        	log.info("Both ObjectFactory & package-info not found in package hierachy");
+        }
+        
         // The code above may have removed some packages from the list. 
         // Retry our lookup with the updated list
         Map<String, JAXBContext> innerMap = jaxbMap.get(cl);
@@ -426,8 +432,7 @@
 	        }
 	        //Catch Throwable as ClassLoader can throw an NoClassDefFoundError that
 	        //does not extend Exception. So we will absorb any Throwable exception here.
-	    } catch (Throwable e) {
-	       log.info("ObjectFactory Class Not Found");
+	    } catch (Throwable e) {	      
            if (log.isDebugEnabled()) {
                log.debug("ObjectFactory Class Not Found " + e);
                log.debug("...caused by " + e.getCause() + " "+ JavaUtils.stackToString(e));
@@ -441,8 +446,7 @@
             }
             //Catch Throwable as ClassLoader can throw an NoClassDefFoundError that
 	        //does not extend Exception. So we will absorb any Throwable exception here.
-        } catch (Throwable e) {
-            log.info("package-info Class Not Found");
+        } catch (Throwable e) {            
             if (log.isDebugEnabled()) {
                 log.debug("package-info Class Not Found " + e);
                 log.debug("...caused by " + e.getCause() + " "+ JavaUtils.stackToString(e));



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org