tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r645158 - in /tomcat/tc6.0.x/trunk: STATUS.txt java/org/apache/catalina/loader/LocalStrings.properties java/org/apache/catalina/loader/WebappClassLoader.java webapps/docs/changelog.xml
Date Sat, 05 Apr 2008 18:34:11 GMT
Author: markt
Date: Sat Apr  5 11:34:10 2008
New Revision: 645158

URL: http://svn.apache.org/viewvc?rev=645158&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44633
Better error message for class version error.

Modified:
    tomcat/tc6.0.x/trunk/STATUS.txt
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/LocalStrings.properties
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
    tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=645158&r1=645157&r2=645158&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Sat Apr  5 11:34:10 2008
@@ -66,13 +66,6 @@
   +1: markt, remm, fhanik
   -1:
 
-* Provide more helpful error message when class can't load due to wrong version
-  https://issues.apache.org/bugzilla/show_bug.cgi?id=44633
-  http://svn.apache.org/viewvc?rev=640451&view=rev
-  http://svn.apache.org/viewvc?rev=640559&view=rev (Rainer's improvement)
-  +1: markt, rjung, fhanik
-  -1:
-
 * Prevent the connector entering an infinite loop
   https://issues.apache.org/bugzilla/show_bug.cgi?id=44620
   http://svn.apache.org/viewvc?rev=640572&view=rev

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/LocalStrings.properties?rev=645158&r1=645157&r2=645158&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/LocalStrings.properties (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/LocalStrings.properties Sat Apr 
5 11:34:10 2008
@@ -29,6 +29,7 @@
 standardLoader.starting=Starting this Loader
 standardLoader.stopping=Stopping this Loader
 webappClassLoader.stopped=Illegal access: this web application instance has been stopped
already.  Could not load {0}.  The eventual following stack trace is caused by an error thrown
for debugging purposes as well as to attempt to terminate the thread which caused the illegal
access, and has no functional impact.
+webappClassLoader.wrongVersion=(unable to load class {0})
 webappLoader.addRepository=Adding repository {0}
 webappLoader.deploy=Deploying class repositories to work directory {0}
 webappLoader.jarDeploy=Deploy JAR {0} to {1}

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=645158&r1=645157&r2=645158&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Sat Apr  5
11:34:10 2008
@@ -1816,9 +1816,16 @@
             }
 
             if (entry.loadedClass == null) {
-                clazz = defineClass(name, entry.binaryContent, 0,
-                        entry.binaryContent.length, 
-                        new CodeSource(entry.codeBase, entry.certificates));
+                try {
+                    clazz = defineClass(name, entry.binaryContent, 0,
+                            entry.binaryContent.length, 
+                            new CodeSource(entry.codeBase, entry.certificates));
+                } catch (UnsupportedClassVersionError ucve) {
+                    throw new UnsupportedClassVersionError(
+                            ucve.getLocalizedMessage() + " " +
+                            sm.getString("webappClassLoader.wrongVersion",
+                                    name));
+                }
                 entry.loadedClass = clazz;
                 entry.binaryContent = null;
                 entry.source = null;

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=645158&r1=645157&r2=645158&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sat Apr  5 11:34:10 2008
@@ -71,6 +71,10 @@
         provided by Chris Hubick. (markt)
       </fix>
       <fix>
+        <bug>44633</bug>: Provide a more helpful error message if a class can't
+        be loaded due to a version error. (rjung/markt)
+      </fix>
+      <fix>
         <bug>44673</bug>: ServletInputStream is no longer readable once closed.
         (markt)
       </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message