tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader StandardClassLoader.java
Date Thu, 08 Feb 2001 01:58:07 GMT
craigmcc    01/02/07 17:58:07

  Modified:    catalina/src/share/org/apache/catalina/loader
                        StandardClassLoader.java
  Log:
  Add some additional debugging instrumentation to assist in locating the
  "package sealing violation" exception problem.
  
  Revision  Changes    Path
  1.10      +24 -6     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java
  
  Index: StandardClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- StandardClassLoader.java	2001/02/04 00:50:40	1.9
  +++ StandardClassLoader.java	2001/02/08 01:58:06	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.9 2001/02/04 00:50:40 glenn Exp $
  - * $Revision: 1.9 $
  - * $Date: 2001/02/04 00:50:40 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardClassLoader.java,v
1.10 2001/02/08 01:58:06 craigmcc Exp $
  + * $Revision: 1.10 $
  + * $Date: 2001/02/08 01:58:06 $
    *
    * ====================================================================
    *
  @@ -109,7 +109,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.9 $ $Date: 2001/02/04 00:50:40 $
  + * @version $Revision: 1.10 $ $Date: 2001/02/08 01:58:06 $
    */
   
   public class StandardClassLoader
  @@ -620,8 +620,12 @@
               int i = name.lastIndexOf('.');
               if (i >= 0) {
                   try {
  +		    if (debug >= 4)
  +		        log("      securityManager.checkPackageDefinition");
                       securityManager.checkPackageDefinition(name.substring(0,i));
                   } catch (Exception se) {
  +		    if (debug >= 4)
  +		        log("      -->Exception-->ClassNotFoundException", se);
   		    throw new ClassNotFoundException(name);
                   }
               }
  @@ -631,7 +635,15 @@
           // (throws ClassNotFoundException if it is not found)
           Class clazz = null;
           try {
  -            clazz = super.findClass(name);
  +	    if (debug >= 4)
  +	        log("      super.findClass(" + name + ")");
  +	    try {
  +	        clazz = super.findClass(name);
  +	    } catch (RuntimeException e) {
  +	        if (debug >= 4)
  +		    log("      -->RuntimeException Rethrown", e);
  +		throw e;
  +	    }
               if (clazz == null) {
                   if (debug >= 3)
                       log("    --> Returning ClassNotFoundException");
  @@ -639,7 +651,7 @@
               }
           } catch (ClassNotFoundException e) {
               if (debug >= 3)
  -                log("    --> Passing on ClassNotFoundException");
  +                log("    --> Passing on ClassNotFoundException", e);
               throw e;
           }
   
  @@ -649,6 +661,8 @@
                   continue;
               String pathname =
                   repositories[i].substring(0, repositories[i].length() - 1);
  +	    if (debug >= 4)
  +	        log("      Checking repository " + pathname);
               if (pathname.startsWith("file://"))
                   pathname = pathname.substring(7);
               else if (pathname.startsWith("file:"))
  @@ -667,6 +681,10 @@
           }
   
           // Return the class we have located
  +	if (debug >= 4)
  +	    log("      Returning class " + clazz);
  +	if ((debug >= 4) && (clazz != null))
  +	    log("      Loaded by " + clazz.getClassLoader());
           return (clazz);
   
       }
  
  
  

Mime
View raw message