Author: markt
Date: Mon May 28 21:46:11 2012
New Revision: 1343401

URL: http://svn.apache.org/viewvc?rev=1343401&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53161
Better error message if a ClassFormatException is encountered during
annotation scanning and do not fail to start the web app in that case.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1343400

Modified: 
tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1343401&r1=1343400&r2=1343401&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/ContextConfig.java 
Mon May 28 21:46:11 2012
@@ -1923,6 +1923,9 @@ public class ContextConfig implements Li
                     } catch (IOException e) {
                         log.error(sm.getString("contextConfig.inputStreamJar",
                                 entryName, url),e);
+                    } catch (ClassFormatException e) {
+                        log.error(sm.getString("contextConfig.inputStreamJar",
+                                entryName, url),e);
                     } finally {
                         if (is != null) {
                             try {
@@ -1979,6 +1982,9 @@ public class ContextConfig implements Li
                     } catch (IOException e) {
                         log.error(sm.getString("contextConfig.inputStreamJndi",
                                 url),e);
+                    } catch (ClassFormatException e) {
+                        log.error(sm.getString("contextConfig.inputStreamJndi",
+                                url),e);
                     } finally {
                         if (is != null) {
                             try {
@@ -2011,6 +2017,9 @@ public class ContextConfig implements Li
             } catch (IOException e) {
                 log.error(sm.getString("contextConfig.inputStreamFile",
                         file.getAbsolutePath()),e);
+            } catch (ClassFormatException e) {
+                log.error(sm.getString("contextConfig.inputStreamFile",
+                        file.getAbsolutePath()),e);
             } finally {
                 if (fis != null) {
                     try {

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1343401&r1=1343400&r2=1343401&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon May 28 21:46:11 2012
@@ -123,6 +123,11 @@
         <bug>53090</bug>: Include superclasses when considering injection
         targets. Patch provided by Borislav Kapukaranov. (markt)
       </fix>
+      <fix>
+        <bug>53161</bug>: Provide a better error message if a
+        <code>ClassFormatException</code> occurs during annotation scanning and
+        do not prevent the web application from starting in this case. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">



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

Reply via email to