svn commit: r1201431 - /tomcat/tc6.0.x/trunk/STATUS.txt
Author: jfclere Date: Sun Nov 13 14:19:09 2011 New Revision: 1201431 URL: http://svn.apache.org/viewvc?rev=1201431&view=rev Log: My vote. Modified: tomcat/tc6.0.x/trunk/STATUS.txt Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=1201431&r1=1201430&r2=1201431&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Nov 13 14:19:09 2011 @@ -99,7 +99,7 @@ PATCHES PROPOSED TO BACKPORT: Backport of r1201069+1201087 from trunk resp. r1201076+r1201088 from TC7 plus making the JK connector consistent with the Coyote one. http://people.apache.org/~rjung/patches/connectors_multi-byte_handling_cleanup-v2.patch - +1: rjung, kkolinko + +1: rjung, kkolinko, jfclere -1: PATCHES/ISSUES THAT ARE STALLED - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52172] New: The build instructions could be a trifle clearer about /usr/share/java
https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 Bug #: 52172 Summary: The build instructions could be a trifle clearer about /usr/share/java Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Documentation AssignedTo: dev@tomcat.apache.org ReportedBy: bimargul...@gmail.com Classification: Unclassified Created attachment 27930 --> https://issues.apache.org/bugzilla/attachment.cgi?id=27930 patch to build doc. attached please find a patch to clarify the use of /usr/share/java. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52173] New: Add a drop of additional clarification to doc on the delegate setting of the WebappClassLoader
https://issues.apache.org/bugzilla/show_bug.cgi?id=52173 Bug #: 52173 Summary: Add a drop of additional clarification to doc on the delegate setting of the WebappClassLoader Product: Tomcat 7 Version: trunk Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Catalina AssignedTo: dev@tomcat.apache.org ReportedBy: bimargul...@gmail.com Classification: Unclassified Created attachment 27931 --> https://issues.apache.org/bugzilla/attachment.cgi?id=27931 javadoc tweaks to WebappClassLoader There is a full description of the 'delegate' flag on the protected boolean member, but programmers using the class are likely to look to the setDelegate function for enlightenment. Further, the IMPLEMENTATION NOTE at the top does not mention the existence of the delegate flag. This patch tries to makes it harder to misunderstand, since the term 'delegate' has, to me at least, a bit of ambiguity to it. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201452 - in /tomcat/tc6.0.x/trunk: ./ java/org/apache/coyote/ajp/ java/org/apache/coyote/http11/ java/org/apache/jk/common/ webapps/docs/
Author: rjung Date: Sun Nov 13 16:14:02 2011 New Revision: 1201452 URL: http://svn.apache.org/viewvc?rev=1201452&view=rev Log: Clean up handling multi-byte chars in the connectors. Backport of r1201069+1201087 from trunk resp. r1201076+r1201088 from TC7 plus making the JK connector consistent with the newer ones. Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpMessage.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java tomcat/tc6.0.x/trunk/java/org/apache/jk/common/JkInputStream.java tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.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=1201452&r1=1201451&r2=1201452&view=diff == --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Nov 13 16:14:02 2011 @@ -95,13 +95,6 @@ PATCHES PROPOSED TO BACKPORT: -1: -* Clean up handling multi-byte chars in the connectors. - Backport of r1201069+1201087 from trunk resp. r1201076+r1201088 from TC7 - plus making the JK connector consistent with the Coyote one. - http://people.apache.org/~rjung/patches/connectors_multi-byte_handling_cleanup-v2.patch - +1: rjung, kkolinko, jfclere - -1: - PATCHES/ISSUES THAT ARE STALLED * Backport JSP unloading patch (BZ48358). Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpMessage.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpMessage.java?rev=1201452&r1=1201451&r2=1201452&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpMessage.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpMessage.java Sun Nov 13 16:14:02 2011 @@ -218,9 +218,7 @@ public class AjpMessage { // but is the only consistent approach within the current // servlet framework. It must suffice until servlet output // streams properly encode their output. -if ((c <= 31) && (c != 9)) { -c = ' '; -} else if (c == 127) { +if (((c <= 31) && (c != 9)) || c == 127 || c > 255) { c = ' '; } appendByte(c); @@ -253,9 +251,7 @@ public class AjpMessage { // but is the only consistent approach within the current // servlet framework. It must suffice until servlet output // streams properly encode their output. -if ((c <= 31) && (c != 9)) { -c = ' '; -} else if (c == 127) { +if (((c <= 31) && (c != 9)) || c == 127 || c > 255) { c = ' '; } appendByte(c); Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?rev=1201452&r1=1201451&r2=1201452&view=diff == --- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java Sun Nov 13 16:14:02 2011 @@ -634,9 +634,7 @@ public class InternalAprOutputBuffer // but is the only consistent approach within the current // servlet framework. It must suffice until servlet output // streams properly encode their output. -if ((c <= 31) && (c != 9)) { -c = ' '; -} else if (c == 127) { +if (((c <= 31) && (c != 9)) || c == 127 || c > 255) { c = ' '; } buf[pos++] = (byte) c; @@ -681,9 +679,7 @@ public class InternalAprOutputBuffer // but is the only consistent approach within the current // servlet framework. It must suffice until servlet output // streams properly encode their output. -if ((c <= 31) && (c != 9)) { -c = ' '; -} else if (c == 127) { +if (((c <= 31) && (c != 9)) || c == 127 || c > 255) { c = ' '; } buf[pos++] = (byte) c; Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java?rev=1201452&r1=1201451&r2=1201452&view=diff == --- tomc
svn commit: r1201493 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc: naming/GenericNamingResourcesFactory.java pool/TrapException.java
Author: kkolinko Date: Sun Nov 13 19:50:48 2011 New Revision: 1201493 URL: http://svn.apache.org/viewvc?rev=1201493&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. TrapException interceptor: Rethrow them as an Error. Do not wrap them into RuntimeException. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/naming/GenericNamingResourcesFactory.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/naming/GenericNamingResourcesFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/naming/GenericNamingResourcesFactory.java?rev=1201493&r1=1201492&r2=1201493&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/naming/GenericNamingResourcesFactory.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/naming/GenericNamingResourcesFactory.java Sun Nov 13 19:50:48 2011 @@ -200,6 +200,13 @@ public class GenericNamingResourcesFacto log.debug("IntrospectionUtils: IllegalAccessException for " + o.getClass() + " " + name + "=" + value + ")", iae); } catch (InvocationTargetException ie) { +Throwable cause = ie.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} if (log.isDebugEnabled()) log.debug("IntrospectionUtils: InvocationTargetException for " + o.getClass() + " " + name + "=" + value + ")", ie); Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java?rev=1201493&r1=1201492&r2=1201493&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/TrapException.java Sun Nov 13 19:50:48 2011 @@ -41,8 +41,11 @@ public class TrapException extends JdbcI return super.invoke(proxy, method, args); }catch (Exception t) { Throwable exception = t; -if (t instanceof InvocationTargetException) { -exception = t.getCause() != null ? t.getCause() : t; +if (t instanceof InvocationTargetException && t.getCause() != null) { +exception = t.getCause(); +if (exception instanceof Error) { +throw exception; +} } Class exceptionClass = exception.getClass(); if (!isDeclaredException(method, exceptionClass)) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201499 - /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java
Author: kkolinko Date: Sun Nov 13 20:05:49 2011 New Revision: 1201499 URL: http://svn.apache.org/viewvc?rev=1201499&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java?rev=1201499&r1=1201498&r2=1201499&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java Sun Nov 13 20:05:49 2011 @@ -114,6 +114,15 @@ public class StatementDecoratorIntercept } return createDecorator(proxy, method, args, statement, constructor, sql); } catch (Exception x) { +if (x instanceof InvocationTargetException) { +Throwable cause = x.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} +} logger.warn("Unable to create statement proxy for slow query report.", x); } return statement; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201502 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml
Author: kkolinko Date: Sun Nov 13 20:17:29 2011 New Revision: 1201502 URL: http://svn.apache.org/viewvc?rev=1201502&view=rev Log: Update to latest jdbc-pool (r1201499) Update changelog for jdbc-pool changes. Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Sun Nov 13 20:17:29 2011 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1189978 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1201499 jdbc-pool 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=1201502&r1=1201501&r2=1201502&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sun Nov 13 20:17:29 2011 @@ -378,6 +378,12 @@ JAR is now required by the Ant tasks. Patch provided by Volker Krebs. (markt) + +In jdbc-pool: Improve handling of Errors that originate from methods +invoked through reflection. In TrapException interceptor: +rethrow Error as is, without wrapping it in a RuntimeException. +(kkolinko) + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201508 - /tomcat/trunk/build.xml
Author: kkolinko Date: Sun Nov 13 20:50:33 2011 New Revision: 1201508 URL: http://svn.apache.org/viewvc?rev=1201508&view=rev Log: When building jdbc-pool from within Tomcat, make it to use Tomcat's output directory. This allows it to respect redefined value of tomcat.output property, moving all output outside the source tree. The new subdirectory used for jdbc-pool build is "output/jdbc-pool". Modified: tomcat/trunk/build.xml Modified: tomcat/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1201508&r1=1201507&r2=1201508&view=diff == --- tomcat/trunk/build.xml (original) +++ tomcat/trunk/build.xml Sun Nov 13 20:50:33 2011 @@ -71,6 +71,8 @@ + + @@ -144,8 +146,8 @@ - - + + @@ -860,7 +862,8 @@ - + + @@ -2149,6 +2152,7 @@ Apache Tomcat ${version} native binaries + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201517 - in /tomcat/tc7.0.x/trunk: ./ build.xml webapps/docs/changelog.xml
Author: kkolinko Date: Sun Nov 13 21:19:18 2011 New Revision: 1201517 URL: http://svn.apache.org/viewvc?rev=1201517&view=rev Log: Merged revision 1201508 from tomcat/trunk: When building jdbc-pool from within Tomcat, use Tomcat's output directory location. The new subdirectory used for jdbc-pool build is "output/jdbc-pool". Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/build.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Nov 13 21:19:18 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178
svn commit: r1201521 - in /tomcat/trunk/java/javax/el: BeanELResolver.java ExpressionFactory.java
Author: kkolinko Date: Sun Nov 13 21:51:18 2011 New Revision: 1201521 URL: http://svn.apache.org/viewvc?rev=1201521&view=rev Log: javax.el: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/javax/el/BeanELResolver.java tomcat/trunk/java/javax/el/ExpressionFactory.java Modified: tomcat/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/BeanELResolver.java?rev=1201521&r1=1201520&r2=1201521&view=diff == --- tomcat/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/trunk/java/javax/el/BeanELResolver.java Sun Nov 13 21:51:18 2011 @@ -88,9 +88,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException(message(context, "propertyReadError", new Object[] { base.getClass().getName(), -property.toString() }), e.getCause()); +property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -136,9 +143,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException(message(context, "propertyWriteError", new Object[] { base.getClass().getName(), -property.toString() }), e.getCause()); +property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -473,7 +487,14 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { -throw new ELException(e.getCause()); +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} +throw new ELException(cause); } context.setPropertyResolved(true); Modified: tomcat/trunk/java/javax/el/ExpressionFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/javax/el/ExpressionFactory.java?rev=1201521&r1=1201520&r2=1201521&view=diff == --- tomcat/trunk/java/javax/el/ExpressionFactory.java (original) +++ tomcat/trunk/java/javax/el/ExpressionFactory.java Sun Nov 13 21:51:18 2011 @@ -200,6 +200,13 @@ public abstract class ExpressionFactory "Unable to create ExpressionFactory of type: " + className, e); } catch (InvocationTargetException e) { +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException( "Unable to create ExpressionFactory of type: " + className, e); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201542 - in /tomcat/trunk/java/org/apache: catalina/core/AprLifecycleListener.java jasper/util/ExceptionUtils.java tomcat/util/ExceptionUtils.java
Author: kkolinko Date: Sun Nov 13 22:59:35 2011 New Revision: 1201542 URL: http://svn.apache.org/viewvc?rev=1201542&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Add helper methods to ExceptionUtils classes. Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java Modified: tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java?rev=1201542&r1=1201541&r2=1201542&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/AprLifecycleListener.java Sun Nov 13 22:59:35 2011 @@ -108,6 +108,7 @@ public class AprLifecycleListener try { initializeSSL(); } catch (Throwable t) { +t = ExceptionUtils.unwrapInvocationTargetException(t); ExceptionUtils.handleThrowable(t); log.error(sm.getString("aprListener.sslInit"), t); } @@ -129,6 +130,7 @@ public class AprLifecycleListener try { terminateAPR(); } catch (Throwable t) { +t = ExceptionUtils.unwrapInvocationTargetException(t); ExceptionUtils.handleThrowable(t); log.info(sm.getString("aprListener.aprDestroy")); } @@ -180,6 +182,7 @@ public class AprLifecycleListener patch = clazz.getField("TCN_PATCH_VERSION").getInt(null); apver = major * 1000 + minor * 100 + patch; } catch (Throwable t) { +t = ExceptionUtils.unwrapInvocationTargetException(t); ExceptionUtils.handleThrowable(t); log.info(sm.getString("aprListener.aprInit", System.getProperty("java.library.path"))); @@ -196,6 +199,7 @@ public class AprLifecycleListener // is below required. terminateAPR(); } catch (Throwable t) { +t = ExceptionUtils.unwrapInvocationTargetException(t); ExceptionUtils.handleThrowable(t); } return; Modified: tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java?rev=1201542&r1=1201541&r2=1201542&view=diff == --- tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java (original) +++ tomcat/trunk/java/org/apache/jasper/util/ExceptionUtils.java Sun Nov 13 22:59:35 2011 @@ -16,6 +16,9 @@ */ package org.apache.jasper.util; +import java.lang.reflect.InvocationTargetException; + + /** * Utilities for handling Throwables and Exceptions. */ @@ -35,4 +38,19 @@ public class ExceptionUtils { } // All other instances of Throwable will be silently swallowed } + +/** + * Checks whether the supplied Throwable is an instance of + * InvocationTargetException and returns the throwable that is + * wrapped by it, if there is any. + * + * @param t the Throwable to check + * @return t or t.getCause() + */ +public static Throwable unwrapInvocationTargetException(Throwable t) { +if (t instanceof InvocationTargetException && t.getCause() != null) { +return t.getCause(); +} +return t; +} } Modified: tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java?rev=1201542&r1=1201541&r2=1201542&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/ExceptionUtils.java Sun Nov 13 22:59:35 2011 @@ -16,6 +16,9 @@ */ package org.apache.tomcat.util; +import java.lang.reflect.InvocationTargetException; + + /** * Utilities for handling Throwables and Exceptions. */ @@ -35,4 +38,19 @@ public class ExceptionUtils { } // All other instances of Throwable will be silently swallowed } + +/** + * Checks whether the supplied Throwable is an instance of + * InvocationTargetException and returns the throwable that is + * wrapped by it, if there is any. + * + * @param t the Throwable to check + * @return t or t.getCause() + */ +public static Throwable unwrapInvocationTargetException(Throwable t) { +if (t instanceof Invocation
svn commit: r1201545 - in /tomcat/trunk/java/org/apache/catalina/core: ApplicationContext.java ApplicationFilterChain.java ApplicationFilterConfig.java ApplicationFilterFactory.java AsyncContextImpl.j
Author: kkolinko Date: Sun Nov 13 23:34:30 2011 New Revision: 1201545 URL: http://svn.apache.org/viewvc?rev=1201545&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java tomcat/trunk/java/org/apache/catalina/core/AsyncContextImpl.java tomcat/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/trunk/java/org/apache/catalina/core/StandardWrapper.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1201545&r1=1201544&r2=1201545&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Sun Nov 13 23:34:30 2011 @@ -981,6 +981,7 @@ public class ApplicationContext } catch (IllegalAccessException e) { throw new ServletException(e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); throw new ServletException(e); } catch (NamingException e) { throw new ServletException(e); @@ -1126,6 +1127,7 @@ public class ApplicationContext } catch (IllegalAccessException e) { throw new ServletException(e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); throw new ServletException(e); } catch (NamingException e) { throw new ServletException(e); @@ -1285,6 +1287,7 @@ public class ApplicationContext "applicationContext.addListener.iae.cnfe", className), e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); throw new IllegalArgumentException(sm.getString( "applicationContext.addListener.iae.cnfe", className), e); @@ -1371,6 +1374,7 @@ public class ApplicationContext } catch (IllegalAccessException e) { throw new ServletException(e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); throw new ServletException(e); } catch (NamingException e) { throw new ServletException(e); Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java?rev=1201545&r1=1201544&r2=1201545&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java Sun Nov 13 23:34:30 2011 @@ -261,6 +261,7 @@ final class ApplicationFilterChain imple filter, request, response, e); throw e; } catch (Throwable e) { +e = ExceptionUtils.unwrapInvocationTargetException(e); ExceptionUtils.handleThrowable(e); if (filter != null) support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT, @@ -452,6 +453,7 @@ final class ApplicationFilterChain imple */ throw e; } catch (Throwable e) { +e = ExceptionUtils.unwrapInvocationTargetException(e); ExceptionUtils.handleThrowable(e); /*if (filter != null) support.fireInstanceEvent(InstanceEvent.AFTER_FILTER_EVENT, Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java?rev=1201545&r1=1201544&r2=1201545&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java Sun Nov 13 23:34:30 2011 @@ -40,6 +40,7 @@ import org.apache.catalina.deploy.Filter import org.apache.catalina.security.SecurityUtil; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.InstanceManager; +import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.log.SystemLogHandler; import org.apache.tomcat.util.modeler.Registry;
svn commit: r1201546 - in /tomcat/trunk/java/org/apache/jasper: runtime/TagHandlerPool.java servlet/JspServletWrapper.java tagplugins/jstl/core/Set.java
Author: kkolinko Date: Sun Nov 13 23:39:25 2011 New Revision: 1201546 URL: http://svn.apache.org/viewvc?rev=1201546&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java tomcat/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java Modified: tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java?rev=1201546&r1=1201545&r2=1201546&view=diff == --- tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java Sun Nov 13 23:39:25 2011 @@ -22,6 +22,7 @@ import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import org.apache.jasper.Constants; +import org.apache.jasper.util.ExceptionUtils; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.tomcat.InstanceManager; @@ -121,7 +122,9 @@ public class TagHandlerPool { return instance; } } catch (Exception e) { -throw new JspException(e.getMessage(), e); +Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); +throw new JspException(e.getMessage(), t); } } @@ -145,8 +148,10 @@ public class TagHandlerPool { try { instanceManager.destroyInstance(handler); } catch (Exception e) { +Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); log.warn("Error processing preDestroy on tag instance of " + -handler.getClass().getName(), e); +handler.getClass().getName(), t); } } @@ -156,12 +161,15 @@ public class TagHandlerPool { */ public synchronized void release() { for (int i = current; i >= 0; i--) { -handlers[i].release(); +Tag handler = handlers[i]; +handler.release(); try { -instanceManager.destroyInstance(handlers[i]); +instanceManager.destroyInstance(handler); } catch (Exception e) { -log.warn("Error processing preDestroy on tag instance of " + -handlers[i].getClass().getName(), e); +Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); +log.warn("Error processing preDestroy on tag instance of " ++ handler.getClass().getName(), t); } } } Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java?rev=1201546&r1=1201545&r2=1201546&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java Sun Nov 13 23:39:25 2011 @@ -170,12 +170,11 @@ public class JspServletWrapper { try { InstanceManager instanceManager = InstanceManagerFactory.getInstanceManager(config); servlet = (Servlet) instanceManager.newInstance(ctxt.getFQCN(), ctxt.getJspLoader()); -} catch (IllegalAccessException e) { -throw new JasperException(e); -} catch (InstantiationException e) { -throw new JasperException(e); } catch (Exception e) { -throw new JasperException(e); +Throwable t = ExceptionUtils +.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); +throw new JasperException(t); } servlet.init(config); @@ -481,9 +480,11 @@ public class JspServletWrapper { try { instanceManager.destroyInstance(theServlet); } catch (Exception e) { +Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); // Log any exception, since it can't be passed along log.error(Localizer.getMessage("jsp.error.file.not.found", -e.getMessage()), e); +e.getMessage()), t); } } } Mo
svn commit: r1201548 - in /tomcat/trunk/java/org/apache/el/parser: AstFunction.java AstValue.java
Author: kkolinko Date: Sun Nov 13 23:40:50 2011 New Revision: 1201548 URL: http://svn.apache.org/viewvc?rev=1201548&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/el/parser/AstFunction.java tomcat/trunk/java/org/apache/el/parser/AstValue.java Modified: tomcat/trunk/java/org/apache/el/parser/AstFunction.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstFunction.java?rev=1201548&r1=1201547&r2=1201548&view=diff == --- tomcat/trunk/java/org/apache/el/parser/AstFunction.java (original) +++ tomcat/trunk/java/org/apache/el/parser/AstFunction.java Sun Nov 13 23:40:50 2011 @@ -114,8 +114,15 @@ public final class AstFunction extends S throw new ELException(MessageFactory.get("error.function", this .getOutputName()), iae); } catch (InvocationTargetException ite) { +Throwable cause = ite.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException(MessageFactory.get("error.function", this -.getOutputName()), ite.getCause()); +.getOutputName()), cause); } return result; } Modified: tomcat/trunk/java/org/apache/el/parser/AstValue.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/el/parser/AstValue.java?rev=1201548&r1=1201547&r2=1201548&view=diff == --- tomcat/trunk/java/org/apache/el/parser/AstValue.java (original) +++ tomcat/trunk/java/org/apache/el/parser/AstValue.java Sun Nov 13 23:40:50 2011 @@ -265,7 +265,14 @@ public final class AstValue extends Simp } catch (IllegalArgumentException iae) { throw new ELException(iae); } catch (InvocationTargetException ite) { -throw new ELException(ite.getCause()); +Throwable cause = ite.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} +throw new ELException(cause); } return result; } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201555 - in /tomcat/trunk/java/org/apache/catalina: core/ deploy/ loader/ manager/ manager/util/ security/ startup/
Author: kkolinko Date: Mon Nov 14 00:08:49 2011 New Revision: 1201555 URL: http://svn.apache.org/viewvc?rev=1201555&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/java/org/apache/catalina/manager/StatusTransformer.java tomcat/trunk/java/org/apache/catalina/manager/util/SessionUtils.java tomcat/trunk/java/org/apache/catalina/security/SecurityUtil.java tomcat/trunk/java/org/apache/catalina/startup/Bootstrap.java tomcat/trunk/java/org/apache/catalina/startup/Tool.java Modified: tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java?rev=1201555&r1=1201554&r2=1201555&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java Mon Nov 14 00:08:49 2011 @@ -35,6 +35,7 @@ import org.apache.catalina.LifecycleEven import org.apache.catalina.LifecycleListener; import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; +import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.res.StringManager; /** @@ -314,6 +315,7 @@ public class JreMemoryLeakPreventionList log.error(sm.getString("jreLeakListener.gcDaemonFail"), e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); log.error(sm.getString("jreLeakListener.gcDaemonFail"), e); } @@ -345,6 +347,7 @@ public class JreMemoryLeakPreventionList log.warn(sm.getString("jreLeakListener.authPolicyFail"), e); } catch (InvocationTargetException e) { +ExceptionUtils.handleThrowable(e.getCause()); log.warn(sm.getString("jreLeakListener.authPolicyFail"), e); } Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java?rev=1201555&r1=1201554&r2=1201555&view=diff == --- tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResources.java Mon Nov 14 00:08:49 2011 @@ -40,6 +40,7 @@ import org.apache.catalina.util.Lifecycl import org.apache.juli.logging.Log; import org.apache.juli.logging.LogFactory; import org.apache.naming.ContextBindings; +import org.apache.tomcat.util.ExceptionUtils; import org.apache.tomcat.util.res.StringManager; @@ -1022,8 +1023,10 @@ public class NamingResources extends Lif log.warn(sm.getString("namingResources.cleanupCloseFailed", closeMethod, name, container), e); } catch (InvocationTargetException e) { +Throwable t = ExceptionUtils.unwrapInvocationTargetException(e); +ExceptionUtils.handleThrowable(t); log.warn(sm.getString("namingResources.cleanupCloseFailed", -closeMethod, name, container), e); +closeMethod, name, container), t); } } } Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java?rev=1201555&r1=1201554&r2=1201555&view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappClassLoader.java Mon Nov 14 00:08:49 2011 @@ -27,7 +27,6 @@ import java.io.InputStream; import java.lang.ref.Reference; import java.lang.ref.WeakReference; import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.net.MalformedURLException; @@ -2039,8 +2038,10 @@ public class WebappClassLoader } } catch (Exception e) { // So many things to go wrong above... +Throwable t = Exception
svn commit: r1201556 - in /tomcat/trunk/java/org/apache: jasper/runtime/JspRuntimeLibrary.java naming/factory/BeanFactory.java naming/factory/DataSourceLinkFactory.java naming/factory/webservices/Serv
Author: kkolinko Date: Mon Nov 14 00:10:55 2011 New Revision: 1201556 URL: http://svn.apache.org/viewvc?rev=1201556&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java tomcat/trunk/java/org/apache/naming/factory/BeanFactory.java tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java tomcat/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java Modified: tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java?rev=1201556&r1=1201555&r2=1201556&view=diff == --- tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java (original) +++ tomcat/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java Mon Nov 14 00:10:55 2011 @@ -40,6 +40,7 @@ import javax.servlet.jsp.tagext.BodyCont import org.apache.jasper.Constants; import org.apache.jasper.JasperException; import org.apache.jasper.compiler.Localizer; +import org.apache.jasper.util.ExceptionUtils; /** * Bunch of util methods that are used by code generated for useBean, @@ -354,6 +355,8 @@ public class JspRuntimeLibrary { } } } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } if (!ignoreMethodNF && (method == null)) { @@ -526,6 +529,8 @@ public class JspRuntimeLibrary { method.invoke (bean, new Object[] {tmpval}); } } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException ("error in invoking method", ex); } } @@ -566,6 +571,8 @@ public class JspRuntimeLibrary { Method method = getReadMethod(o.getClass(), prop); value = method.invoke(o, (Object[]) null); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException (ex); } return value; @@ -610,6 +617,8 @@ public class JspRuntimeLibrary { false ) }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -622,6 +631,8 @@ public class JspRuntimeLibrary { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { value }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -634,6 +645,8 @@ public class JspRuntimeLibrary { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { Integer.valueOf(value) }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -646,6 +659,8 @@ public class JspRuntimeLibrary { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { Short.valueOf(value) }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -658,6 +673,8 @@ public class JspRuntimeLibrary { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { Long.valueOf(value) }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -670,6 +687,8 @@ public class JspRuntimeLibrary { Method method = getWriteMethod(bean.getClass(), prop); method.invoke(bean, new Object[] { Double.valueOf(value) }); } catch (Exception ex) { +Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex); +ExceptionUtils.handleThrowable(thr); throw new JasperException(ex); } } @@ -682,6 +701,8 @@ public class JspRuntimeLibrary { Method
svn commit: r1201562 - in /tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor: AbstractQueryReport.java StatementDecoratorInterceptor.java
Author: kkolinko Date: Mon Nov 14 00:44:07 2011 New Revision: 1201562 URL: http://svn.apache.org/viewvc?rev=1201562&view=rev Log: Unwrap InvocationTargetException if it is caught in ResultSetProxy, like we do it elsewhere. Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java?rev=1201562&r1=1201561&r2=1201562&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/AbstractQueryReport.java Mon Nov 14 00:44:07 2011 @@ -235,8 +235,9 @@ public abstract class AbstractQueryRepor result = method.invoke(delegate,args); }catch (Throwable t) { reportFailedQuery(query,args,name,start,t); -if (t instanceof InvocationTargetException) { -throw t.getCause() != null ? t.getCause() : t; +if (t instanceof InvocationTargetException +&& t.getCause() != null) { +throw t.getCause(); } else { throw t; } Modified: tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java URL: http://svn.apache.org/viewvc/tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java?rev=1201562&r1=1201561&r2=1201562&view=diff == --- tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java (original) +++ tomcat/trunk/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/interceptor/StatementDecoratorInterceptor.java Mon Nov 14 00:44:07 2011 @@ -240,8 +240,9 @@ public class StatementDecoratorIntercept result = method.invoke(delegate, args); } } catch (Throwable t) { -if (t instanceof InvocationTargetException) { -throw t.getCause() != null ? t.getCause() : t; +if (t instanceof InvocationTargetException +&& t.getCause() != null) { +throw t.getCause(); } else { throw t; } @@ -284,7 +285,16 @@ public class StatementDecoratorIntercept if (method.getName().equals("getStatement")) { return this.st; } else { -return method.invoke(this.delegate, args); +try { +return method.invoke(this.delegate, args); +} catch (Throwable t) { +if (t instanceof InvocationTargetException +&& t.getCause() != null) { +throw t.getCause(); +} else { +throw t; +} +} } } } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201566 - in /tomcat/tc7.0.x/trunk: modules/ webapps/docs/changelog.xml
Author: kkolinko Date: Mon Nov 14 00:53:10 2011 New Revision: 1201566 URL: http://svn.apache.org/viewvc?rev=1201566&view=rev Log: Update jdbc-pool to r1201562 Modified: tomcat/tc7.0.x/trunk/modules/ (props changed) tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/modules/ -- --- svn:externals (original) +++ svn:externals Mon Nov 14 00:53:10 2011 @@ -1 +1 @@ -^/tomcat/trunk/modules/jdbc-pool@1201499 jdbc-pool +^/tomcat/trunk/modules/jdbc-pool@1201562 jdbc-pool 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=1201566&r1=1201565&r2=1201566&view=diff == --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Nov 14 00:53:10 2011 @@ -385,6 +385,10 @@ (kkolinko) +In jdbc-pool: Unwrap InvocationTargetException if it is caught in +ResultSetProxy, like we do it elsewhere. (kkolinko) + + When building jdbc-pool from within Tomcat, use Tomcat's output directory location. This allows to move all build output away from the source tree. (kkolinko) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201568 - in /tomcat/trunk: java/org/apache/catalina/core/ java/org/apache/tomcat/util/ java/org/apache/tomcat/util/digester/ test/org/apache/catalina/tribes/demos/
Author: kkolinko Date: Mon Nov 14 01:10:51 2011 New Revision: 1201568 URL: http://svn.apache.org/viewvc?rev=1201568&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java tomcat/trunk/java/org/apache/tomcat/util/digester/Digester.java tomcat/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java?rev=1201568&r1=1201567&r2=1201568&view=diff == --- tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java (original) +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java Mon Nov 14 01:10:51 2011 @@ -191,6 +191,7 @@ public class ApplicationContextFacade im return (URL) invokeMethod(context, "getResource", new Object[]{path}); } catch(Throwable t) { +ExceptionUtils.handleThrowable(t); if (t instanceof MalformedURLException){ throw (MalformedURLException)t; } @@ -765,6 +766,7 @@ public class ApplicationContextFacade im try{ return invokeMethod(context, methodName, params); }catch(Throwable t){ +ExceptionUtils.handleThrowable(t); throw new RuntimeException(t.getMessage(), t); } } @@ -870,8 +872,10 @@ public class ApplicationContextFacade im } if (ex instanceof InvocationTargetException) { -realException = -((InvocationTargetException) ex).getTargetException(); +realException = ex.getCause(); +if (realException == null) { +realException = ex; +} } else { realException = ex; } Modified: tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java?rev=1201568&r1=1201567&r2=1201568&view=diff == --- tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java Mon Nov 14 01:10:51 2011 @@ -264,6 +264,7 @@ public final class IntrospectionUtils { log.debug("IntrospectionUtils: IllegalAccessException for " + o.getClass() + " " + name + "=" + value + ")", iae); } catch (InvocationTargetException ie) { +ExceptionUtils.handleThrowable(ie.getCause()); if (log.isDebugEnabled()) log.debug("IntrospectionUtils: InvocationTargetException for " + o.getClass() + " " + name + "=" + value + ")", ie); @@ -312,6 +313,7 @@ public final class IntrospectionUtils { log.debug("IntrospectionUtils: IllegalAccessException for " + o.getClass() + " " + name + ")", iae); } catch (InvocationTargetException ie) { +ExceptionUtils.handleThrowable(ie.getCause()); if (log.isDebugEnabled()) log.debug("IntrospectionUtils: InvocationTargetException for " + o.getClass() + " " + name + ")"); @@ -454,7 +456,12 @@ public final class IntrospectionUtils { if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); -return m.invoke(target, new Object[] { param1 }); +try { +return m.invoke(target, new Object[] { param1 }); +} catch (InvocationTargetException ie) { +ExceptionUtils.handleThrowable(ie.getCause()); +throw ie; +} } /** @@ -478,7 +485,12 @@ public final class IntrospectionUtils { if (m == null) throw new NoSuchMethodException(target.getClass().getName() + " " + methodN); -return m.invoke(target, emptyArray); +try { +return m.invoke(target, emptyArray); +} catch (InvocationTargetException ie) { +ExceptionUtils.handleThrowable(ie.getCause()); +throw ie; +} } /** @@ -497,21 +509,27 @@ public final class IntrospectionUtils { " in " + target + " CLASS " + target.getClass()); return null; } -Object o = m.invoke(target, params); +try { +Object o = m.invoke(target, params); -if (log.isDebugEnabled()) { -// debu
svn commit: r1201569 - in /tomcat/tc7.0.x/trunk/java: javax/el/ org/apache/catalina/core/ org/apache/catalina/deploy/ org/apache/catalina/loader/ org/apache/catalina/manager/ org/apache/catalina/manag
Author: kkolinko Date: Mon Nov 14 01:36:07 2011 New Revision: 1201569 URL: http://svn.apache.org/viewvc?rev=1201569&view=rev Log: Merging revisions r1201521 r1201542 r1201545 r1201546 r1201548 r1201555 r1201556 r1201568 from tomcat/trunk: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Part 1 of 2. Modified: tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java tomcat/tc7.0.x/trunk/java/javax/el/ExpressionFactory.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AprLifecycleListener.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/AsyncContextImpl.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/JreMemoryLeakPreventionListener.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardContext.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/deploy/NamingResources.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappClassLoader.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/StatusTransformer.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/manager/util/SessionUtils.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Bootstrap.java tomcat/tc7.0.x/trunk/java/org/apache/catalina/startup/Tool.java Modified: tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java?rev=1201569&r1=1201568&r2=1201569&view=diff == --- tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java (original) +++ tomcat/tc7.0.x/trunk/java/javax/el/BeanELResolver.java Mon Nov 14 01:36:07 2011 @@ -88,9 +88,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException(message(context, "propertyReadError", new Object[] { base.getClass().getName(), -property.toString() }), e.getCause()); +property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -136,9 +143,16 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} throw new ELException(message(context, "propertyWriteError", new Object[] { base.getClass().getName(), -property.toString() }), e.getCause()); +property.toString() }), cause); } catch (Exception e) { throw new ELException(e); } @@ -473,7 +487,14 @@ public class BeanELResolver extends ELRe } catch (IllegalAccessException e) { throw new ELException(e); } catch (InvocationTargetException e) { -throw new ELException(e.getCause()); +Throwable cause = e.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} +throw new ELException(cause); } context.setPropertyResolved(true); Modified: tomcat/tc7.0.x/trunk/java/javax/el/ExpressionFactory.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/javax/el/ExpressionFactory.java?rev=1201569&r1=1201568&r2=1201569&view=diff == --- tomcat/tc7.0.x/trunk/java/javax/el/ExpressionFactory.java (origina
svn commit: r1201570 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/el/parser/ java/org/apache/jasper/runtime/ java/org/apache/jasper/servlet/ java/org/apache/jasper/tagplugins/jstl/core/ java/org/apa
Author: kkolinko Date: Mon Nov 14 01:38:18 2011 New Revision: 1201570 URL: http://svn.apache.org/viewvc?rev=1201570&view=rev Log: Merging revisions r1201521 r1201542 r1201545 r1201546 r1201548 r1201555 r1201556 r1201568 from tomcat/trunk: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown. Part 2 of 2. Updated mergeinfo and changelog. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/el/parser/AstFunction.java tomcat/tc7.0.x/trunk/java/org/apache/el/parser/AstValue.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/runtime/TagHandlerPool.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/tagplugins/jstl/core/Set.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/util/ExceptionUtils.java tomcat/tc7.0.x/trunk/java/org/apache/naming/factory/BeanFactory.java tomcat/tc7.0.x/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java tomcat/tc7.0.x/trunk/java/org/apache/naming/factory/webservices/ServiceRefFactory.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/ExceptionUtils.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/IntrospectionUtils.java tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/digester/Digester.java tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/demos/IntrospectionUtils.java tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Nov 14 01:38:18 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,116077
DO NOT REPLY [Bug 52172] The build instructions could be a trifle clearer about /usr/share/java
https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 Konstantin Kolinko changed: What|Removed |Added Attachment #27930|0 |1 is patch|| Attachment #27930|application/octet-stream|text/plain mime type|| -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
DO NOT REPLY [Bug 52173] Add a drop of additional clarification to doc on the delegate setting of the WebappClassLoader
https://issues.apache.org/bugzilla/show_bug.cgi?id=52173 Konstantin Kolinko changed: What|Removed |Added Attachment #27931|0 |1 is patch|| Attachment #27931|application/octet-stream|text/plain mime type|| -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201576 - in /tomcat/trunk: BUILDING.txt webapps/docs/building.xml
Author: kkolinko Date: Mon Nov 14 02:17:52 2011 New Revision: 1201576 URL: http://svn.apache.org/viewvc?rev=1201576&view=rev Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 Make build instructions clearer about /usr/bin/java Based on the patch by bimargulies Modified: tomcat/trunk/BUILDING.txt tomcat/trunk/webapps/docs/building.xml Modified: tomcat/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/trunk/BUILDING.txt?rev=1201576&r1=1201575&r2=1201576&view=diff == --- tomcat/trunk/BUILDING.txt (original) +++ tomcat/trunk/BUILDING.txt Mon Nov 14 02:17:52 2011 @@ -91,9 +91,13 @@ do the following: file to indicate to Ant the proxy configuration. Read below. * WARNING: Running this command will download binaries to the /usr/share/java - directory. Make sure this is appropriate to do on your computer. On Windows, - this usually corresponds to the "C:\usr\share\java" directory, unless Cygwin - is used. Read below to customize the directory used to download the binaries. + directory. On a typical Linux or MacOX system an ordinary user + will not have access to write to this directory, and, even if you do, + it may not be appropriate for you to write there. + + On Windows this usually corresponds to the "C:\usr\share\java" + directory, unless Cygwin is used. Read the next section to learn how + to customize the directory used to download the binaries. * The build can be controlled by creating a ${tomcat.source}/build.properties file, and adding the following content to it: @@ -107,7 +111,7 @@ do the following: # - Default Base Path for Dependent Packages - # Replace this path with the directory path where dependencies binaries # should be downloaded -base.path=/usr/share/java +base.path=/home/me/some-place-to-download-to (3) Updating sources Modified: tomcat/trunk/webapps/docs/building.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/building.xml?rev=1201576&r1=1201575&r2=1201576&view=diff == --- tomcat/trunk/webapps/docs/building.xml (original) +++ tomcat/trunk/webapps/docs/building.xml Mon Nov 14 02:17:52 2011 @@ -119,10 +119,12 @@ Use the following commands to build Tomc WARNING: Running this command will download binary binaries to the /usr/share/java directory by default. - Make sure this is appropriate to do so on your computer. On Windows, + On a typical Linux or MacOX system, an ordinary user + will not have access to write to this directory, and, even if you do, + it may not be appropriate for you to write there. On Windows this usually corresponds to the C:\usr\share\java directory, - unless Cygwin is used. Read below to customize the directory used - to download the binaries. + unless Cygwin is used. Read below to learn how to customize the directory + used to download the binaries. @@ -139,7 +141,7 @@ Use the following commands to build Tomc # - Default Base Path for Dependent Packages - # Replace this path with the directory path where # dependencies binaries should be downloaded. -base.path=/usr/share/java +base.path=/home/me/some-place-to-download-to @@ -168,6 +170,13 @@ However, it will allow you to view and e get warnings, reformat code, perform refactorings, run Tomcat under the IDE, and so on. + + +WARNING: Do not forget to create and configure + ${tomcat.source}/build.properties file as described above + before running any Ant targets. + + Sample Eclipse project files and launch targets are provided in the res/ide-support/eclipse directory of the source tree. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201578 - in /tomcat/tc7.0.x/trunk: ./ BUILDING.txt webapps/docs/building.xml webapps/docs/changelog.xml
Author: kkolinko Date: Mon Nov 14 02:23:41 2011 New Revision: 1201578 URL: http://svn.apache.org/viewvc?rev=1201578&view=rev Log: Merged revision 1201576 from tomcat/trunk: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 Make build instructions clearer about /usr/bin/java Based on the patch by bimargulies Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/BUILDING.txt tomcat/tc7.0.x/trunk/webapps/docs/building.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Nov 14 02:23:41 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,11758
svn commit: r1201581 - in /tomcat/tc6.0.x/trunk: ./ BUILDING.txt webapps/docs/building.xml webapps/docs/changelog.xml
Author: kkolinko Date: Mon Nov 14 02:45:00 2011 New Revision: 1201581 URL: http://svn.apache.org/viewvc?rev=1201581&view=rev Log: Merged revision 1201576 from tomcat/trunk: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 Make build instructions clearer about /usr/bin/java. Based on the patch by bimargulies Also updated instructions for setting up Eclipse IDE. Some of them were obsolete. Modified: tomcat/tc6.0.x/trunk/ (props changed) tomcat/tc6.0.x/trunk/BUILDING.txt tomcat/tc6.0.x/trunk/webapps/docs/building.xml tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc6.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Nov 14 02:45:00 2011 @@ -1 +1 @@ -/tomcat/trunk:601180,606992,612607,630314,640888,652744,653247,666232,673796,673820,677910,683969,683982,684001,684081,684234,684269-684270,685177,687503,687645,689402,690781,691392,691805,692748,693378,694992,695053,695311,696780,696782,698012,698227,698236,698613,699427,699634,701355,709294,709811,709816,710063,710066,710125,710205,711126,711600,712461,712467,713953,714002,718360,719119,719124,719602,719626,719628,720046,720069,721040,721286,721708,721886,723404,723738,726052,727303,728032,728768,728947,729057,729567,729569,729571,729681,729809,729815,729934,730250,730590,731651,732859,732863,734734,740675,740684,742677,742697,742714,744160,744238,746321,746384,746425,747834,747863,748344,750258,750291,750921,751286-751287,751289,751295,752323,753039,757335,757774,758249,758365,758596,758616,758664,759074,761601,762868,762929,762936-762937,763166,763183,763193,763228,763262,763298,763302,763325,763599,763611,763654,763681,763706,764985,764997,765662,768335,769979,770716,77 0809,770876,772872,776921,776924,776935,776945,777464,777466,777576,777625,778379,778523-778524,781528,781779,782145,782791,783316,783696,783724,783756,783762,783766,783863,783934,784453,784602,784614,785381,785688,785768,785859,786468,786487,786490,786496,786667,787627,787770,787985,789389,790405,791041,791184,791194,791224,791243,791326,791328,791789,792740,793372,793757,793882,793981,794082,794673,794822,795043,795152,795210,795457,795466,797168,797425,797596,797607,802727,802940,804462,804544,804734,805153,809131,809603,810916,810977,812125,812137,812432,813001,813013,813866,814180,814708,814876,815972,816252,817442,817822,819339,819361,820110,820132,820874,820954,821397,828196,828201,828210,828225,828759,830378-830379,830999,831106,831774,831785,831828,831850,831860,832214,832218,833121,833545,834047,835036,835336,836405,881396,881412,883130,883134,883146,883165,883177,883362,883565,884341,885038,885231,885241,885260,885901,885991,886019,888072,889363,889606,889716,8901 39,890265,890349-890350,890417,891185-891187,891583,892198,892341,892415,892464,892555,892812,892814,892817,892843,892887,893321,893493,894580,894586,894805,894831,895013,895045,895057,895191,895392,895703,896370,896384,897380-897381,897776,898126,898256,898468,898527,898555,898558,898718,898836,898906,899284,899348,899420,899653,899769-899770,899783,899788,899792,899916,899918-899919,899935,899949,903916,905020,905151,905722,905728,905735,907311,907513,907538,907652,907819,907825,907864,908002,908721,908754,908759,909097,909206,909212,909525,909636,909869,909875,909887,910266,910370,910442,910471,910485,910974,915226,915737,915861,916097,916141,916157,916170,917598,917633,918093,918489,918594,918684,918787,918792,918799,918803,918885,919851,919914,920025,920055,920298,920449,920596,920824,920840,921444,922010,926716,927062,927621,928482,928695,928732,928798,931709,932357,932967,935105,935983,939491,939551,940064,941356,941463,943112,944409,944416,945231,945808,945835,945841 ,946686,948057,950164,950596,950614,950851,950905,951615,953434,954435,955648,955655,956832,957130,957830,958192,960701,961948,962865,962872,962881,962900,963106,963865,963868,964614,966177-966178,966292,966692,966863,981815,988448,991837,993042,1001955,1002185,1002263,1002274,1002349,1002359,1002362,1002481,1002514,1003461,1003481,1003488,1003556,1003572,1003581,1003861,1004393,1004409,1004415,1004868-1004869,1004912,1005452,1005467,1005647,1005802,1022120,1022134,1022323,1022415,1022606,1022623,1024224,1024251,1026042,1026784,1026912,1026920,1029767,1033415,1033448,1033842,1033897,1037715,1037794,1037887,1037924,1038041,1042022,1042029,1042447,1042452,1042494,1044944,1044987,1050249,1055055,1055236,1055458,1055975,1056264,1056828,1056889,1059881,1061412,1061442,1061446,1062398,1064652,1066244,1066772,1067039,1067139,1069824,1070139,1070420,1070609,1072042,1073393,1075458,1076212,1078409,1078412,1079801,1081334,1088179,1088460,1090022,1094069,1094089,1095138,1097899,1099575 ,1099586,1099772,1099789,1100145,1100822,1101094,1101144,1124680,1130774,1133014,1137862,1137996,1138950,1138953,1140693,1141104,1141441,1142043,1142904,1143134,1143150,1148216,1148471,1152601,1156171,1156519,1164567,1167394,11722
DO NOT REPLY [Bug 52172] The build instructions could be a trifle clearer about /usr/share/java
https://issues.apache.org/bugzilla/show_bug.cgi?id=52172 --- Comment #1 from Konstantin Kolinko 2011-11-14 02:46:54 UTC --- Fixed in trunk, Tomcat 7, Tomcat 6 with r1201576 r1201578 r1201581 respectively, will be in 7.0.23, 6.0.34. I'll take a look at 5.5 later. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201603 - /tomcat/tc5.5.x/trunk/STATUS.txt
Author: rjung Date: Mon Nov 14 05:40:08 2011 New Revision: 1201603 URL: http://svn.apache.org/viewvc?rev=1201603&view=rev Log: Propose. Modified: tomcat/tc5.5.x/trunk/STATUS.txt Modified: tomcat/tc5.5.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc5.5.x/trunk/STATUS.txt?rev=1201603&r1=1201602&r2=1201603&view=diff == --- tomcat/tc5.5.x/trunk/STATUS.txt (original) +++ tomcat/tc5.5.x/trunk/STATUS.txt Mon Nov 14 05:40:08 2011 @@ -76,3 +76,12 @@ PATCHES PROPOSED TO BACKPORT: svn propset svn:eol-style native container/webapps/docs/config/filter.xml +1: kkolinko -1: + +* Clean up handling multi-byte chars in the connectors plus makin + the JK connector consistent with the newer ones. + Backport of r1201069+1201087 from trunk resp. r1201076+r1201088 from TC7 + and r1201452 from TC 6. TC 6 patch applies with small offsets: + http://people.apache.org/~rjung/patches/connectors_multi-byte_handling_cleanup-v2.patch + +1: rjung + -1: + - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
Re: Redeploy on context.xml changes (Was: Tagging 7.0.23)
2011/11/10 Mark Thomas : > On 08/11/2011 22:49, Mark Thomas wrote: >> I found some time today to look at this. Summarising the issues so far: >> >> 1. I have separately applied a couple of minor fixes that were included >> in the larger patch. >> >> 2. Renaming watchedResources -> reloadResoucres >> Agree with reverting this change >> >> 3. Adding JavaDoc to FailedContext >> Agree with doing this. I tweaked the wording a little bit as it might >> not be a StandardContext instance that we failed to create >> >> 3. Formatting of FailedContext >> Given that the majority of the code is NO-OP and the rest is pretty much >> getters/setters the current formatting is deliberate to reduce the >> length of the file. I did something similar for WebXml. >> >> 4. s/absolue/absolute/ >> Drat. Missed this first time around. Fixed now. >> >> 5. redeployResource has been implemented for FailedContext >> >> 6. Unexpected deletion of resources due to adding conf/context.xml to >> redeployResources >> - removed redeployResources from Context >> - ensure global resources are never deleted >> - add global resources at end of redeploy list >> >> >> Particularly with the changes for 6, the patch should be easier to read. >> >> The patch is here: >> http://people.apache.org/~markt/patches/2011-11-08-redeploy-trunk-v4.patch >> >> There are currently a few open TC7 bugs so fixing those should provide >> enough time to review this patch before the 7.0.23 tag. > > It has been a couple of days and no objections so I plan to apply this > patch in the next day or so and tag 7.0.23 early next week. That should > give me time to fix the remaining open bug and any unit test and/or TCK > failures that appear. > 1) s/Redploy/Redeploy/ in several comments. 2) In HostConfig.checkResources() there are three occurrences of the following code: if (... || (current.getAbsolutePath().startsWith( configBase().getAbsolutePath( { if (log.isDebugEnabled()) log.debug("Delete " + current); ExpandWar.delete(current); } Thus the following two files will be deleted: - CATALINA_BASE/conf///.xml - CATALINA_BASE/conf///context.xml.default Actually there is the following code block that protects "context.xml.default", but it is only in 2 places out of 3: // Never delete per host context.xml defaults if (Constants.HostContextXml.equals( current.getName())) { continue; } It is easy to fix. 3) Testing redeployment. Using the following configuration: - Default tomcat build, plus make two copies of the default context.xml file: cp context.xml Catalina/localhost/context.xml.default cp context.xml Catalina/localhost/examples.xml Tests: 1. touch context.xml -> OK, all redeployed 2. touch context.xml.default -> OK, all redeployed 3. touch examples.xml -> FAIL, redeployed examples app, but it deleted "context.xml.default" (causing redeployment of all other webapps) Now shutdown Tomcat, restore "context.xml.default" and start Tomcat 4. delete examples.xml -> Examples app is undeployed, but is instantly deployed again as "web application directory". It is strange. Is it expected? 5. rename "context.xml.default" -> OK, all redeployed 6. rename "context.xml" -> OK, all redeployed I have not tested what happens if I deploy a war file. 4) There is StandardContext#setDefaultContextXml() method. I do not see it being called by Tomcat code, nor I see it documented in config/context.html. The code itself is old, starting with the following commit (Sept 2004, 7 years ago). http://svn.apache.org/viewvc?view=revision&revision=303172 Do not know why it is needed. Maybe for some embedding scenarios. It provides an alternative for conf/context.xml. I mean that HostConfig#addGlobalRedeployResources() could use that file, but it is unclear how to prevent its deletion on undeploy. It is a minor and rare issue though (and it is not so important what file you are going to touch to cause redeployment. Let's allow to touch conf/context.xml regardless of this configuration). 5) FailedContext is used in HostConfig class only. Actually HostConfig#digester just preparses the context.xml file: it processes only the root element and its attributes. Main parsing is done in ContextConfig#init() -> #contextConfig(Digester) -> calls #processContextConfig(Digester, URL) x 3 times. There is ContextConfig#ok flag that is reset to "false" if parsing fails. At end of ContextConfig#configureStart() it does: if (ok) { context.setConfigured(true); } else { log.error(sm.getString("contextConfig.unavailable")); context.setConfigured(false); } I mean: - FailedConte
svn commit: r1201606 - in /tomcat/jk/trunk/native/common: jk_ajp_common.c jk_pool.c jk_shm.c
Author: mturk Date: Mon Nov 14 06:19:07 2011 New Revision: 1201606 URL: http://svn.apache.org/viewvc?rev=1201606&view=rev Log: Fix code style. No functional change Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c tomcat/jk/trunk/native/common/jk_pool.c tomcat/jk/trunk/native/common/jk_shm.c Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1201606&r1=1201605&r2=1201606&view=diff == --- tomcat/jk/trunk/native/common/jk_ajp_common.c (original) +++ tomcat/jk/trunk/native/common/jk_ajp_common.c Mon Nov 14 06:19:07 2011 @@ -90,11 +90,9 @@ static int sc_for_req_method(const char but I'm assuming (probably incorrectly) we want more speed here (based on the optimizations the previous code was doing). */ -switch (len) -{ +switch (len) { case 3: -switch (method[0]) -{ +switch (method[0]) { case 'A': return (method[1] == 'C' && method[2] == 'L' @@ -112,8 +110,7 @@ static int sc_for_req_method(const char } case 4: -switch (method[0]) -{ +switch (method[0]) { case 'H': return (method[1] == 'E' && method[2] == 'A' @@ -144,8 +141,7 @@ static int sc_for_req_method(const char } case 5: -switch (method[2]) -{ +switch (method[2]) { case 'R': return (memcmp(method, "MERGE", 5) == 0 ? SC_M_MERGE : UNKNOWN_METHOD); @@ -163,11 +159,9 @@ static int sc_for_req_method(const char } case 6: -switch (method[0]) -{ +switch (method[0]) { case 'U': -switch (method[5]) -{ +switch (method[5]) { case 'K': return (memcmp(method, "UNLOCK", 6) == 0 ? SC_M_UNLOCK : UNKNOWN_METHOD); @@ -191,8 +185,7 @@ static int sc_for_req_method(const char } case 7: -switch (method[1]) -{ +switch (method[1]) { case 'P': return (memcmp(method, "OPTIONS", 7) == 0 ? SC_M_OPTIONS : UNKNOWN_METHOD); @@ -204,8 +197,7 @@ static int sc_for_req_method(const char } case 8: -switch (method[0]) -{ +switch (method[0]) { case 'P': return (memcmp(method, "PROPFIND", 8) == 0 ? SC_M_PROPFIND : UNKNOWN_METHOD); @@ -221,8 +213,7 @@ static int sc_for_req_method(const char ? SC_M_PROPPATCH : UNKNOWN_METHOD); case 10: -switch (method[0]) -{ +switch (method[0]) { case 'U': return (memcmp(method, "UNCHECKOUT", 10) == 0 ? SC_M_UNCHECKOUT : UNKNOWN_METHOD); @@ -280,67 +271,52 @@ static int sc_for_req_header(const char if (memcmp(p, "CCEPT", 6) == 0) { if (!header[6]) return SC_ACCEPT; -else if (header[6] == '-') { +if (header[6] == '-') { p += 6; if (memcmp(p, "CHARSET", 8) == 0) return SC_ACCEPT_CHARSET; -else if (memcmp(p, "ENCODING", 9) == 0) +if (memcmp(p, "ENCODING", 9) == 0) return SC_ACCEPT_ENCODING; -else if (memcmp(p, "LANGUAGE", 9) == 0) +if (memcmp(p, "LANGUAGE", 9) == 0) return SC_ACCEPT_LANGUAGE; -else -return UNKNOWN_METHOD; } -else -return UNKNOWN_METHOD; +return UNKNOWN_METHOD; } -else if (memcmp(p, "UTHORIZATION", 13) == 0) +if (memcmp(p, "UTHORIZATION", 13) == 0) return SC_AUTHORIZATION; -else -return UNKNOWN_METHOD; break; case 'C': if(memcmp(p, "OOKIE2", 7) == 0) return SC_COOKIE2; -else if (memcmp(p, "OOKIE", 6) == 0) +if (memcmp(p, "OOKIE", 6) == 0) return SC_COOKIE; -else if(memcmp(p, "ONNECTION", 10) == 0) +if(memcmp(p, "ONNECTION", 10) == 0) return SC_CONNECTION; -else if(memcmp(p, "ONTENT-TYPE", 12) == 0) +if(memcmp(p, "ONTENT-TYPE", 12) == 0) return SC_CONTENT_TYPE; -else if(memcmp(p, "ONTENT-LENGTH", 14) == 0) +if(memcmp(p, "ONTENT-LENGTH", 14) == 0) return SC_CONTENT_LENGTH; -else -return UNKNOWN_METHOD; break; case 'H': if(memcmp(p, "OST", 4) == 0) return SC_HO
svn commit: r1201607 - in /tomcat/jk/trunk/native: apache-2.0/mod_jk.c iis/jk_isapi_plugin.c
Author: mturk Date: Mon Nov 14 06:35:49 2011 New Revision: 1201607 URL: http://svn.apache.org/viewvc?rev=1201607&view=rev Log: Fix code style. No functional change Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Modified: tomcat/jk/trunk/native/apache-2.0/mod_jk.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/apache-2.0/mod_jk.c?rev=1201607&r1=1201606&r2=1201607&view=diff == --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c (original) +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c Mon Nov 14 06:35:49 2011 @@ -361,7 +361,8 @@ static int JK_METHOD ws_start_response(j */ if (status != 500 && !strncmp(reason, "500 ", 4)) { reason = "Unknown Reason"; -} else { +} +else { /* Apache httpd returns a full status line, * but we only want a reason phrase, so skip * the prepended status code. @@ -598,8 +599,9 @@ static void JK_METHOD ws_vhost_to_text(v server_rec *s = (server_rec *)d; size_t used = 0; -if (s->server_hostname) +if (s->server_hostname) { used += strlen(s->server_hostname); +} if (!s->is_virtual) { if (s->port) used += strlen(":X"); @@ -1721,23 +1723,21 @@ static struct log_item_list char ch; item_key_func func; } log_item_keys[] = { - -{ -'T', log_request_duration}, { -'r', log_request_line}, { -'U', log_request_uri}, { -'s', log_status}, { -'b', clf_log_bytes_sent}, { -'B', log_bytes_sent}, { -'V', log_server_name}, { -'v', log_virtual_host}, { -'p', log_server_port}, { -'H', log_request_protocol}, { -'m', log_request_method}, { -'q', log_request_query}, { -'w', log_worker_name}, { -'R', log_worker_route}, { -'\0'} +{ 'T', log_request_duration }, +{ 'r', log_request_line }, +{ 'U', log_request_uri }, +{ 's', log_status }, +{ 'b', clf_log_bytes_sent }, +{ 'B', log_bytes_sent }, +{ 'V', log_server_name }, +{ 'v', log_virtual_host }, +{ 'p', log_server_port }, +{ 'H', log_request_protocol }, +{ 'm', log_request_method }, +{ 'q', log_request_query }, +{ 'w', log_worker_name }, +{ 'R', log_worker_route}, +{ '\0', NULL } }; static struct log_item_list *find_log_func(char k) @@ -2852,7 +2852,8 @@ static void *create_jk_config(apr_pool_t c->log_level = JK_UNSET; c->ssl_enable = JK_UNSET; c->strip_session = JK_UNSET; -} else { +} +else { if (!jk_map_alloc(&(c->uri_to_context))) { ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "Memory error"); } @@ -3230,10 +3231,10 @@ static void jk_child_init(apr_pool_t * p apr_pool_cleanup_register(pconf, conf->log, jk_cleanup_shmem, apr_pool_cleanup_null); } -else +else { jk_log(conf->log, JK_LOG_ERROR, "Attaching shm:%s errno=%d", jk_shm_name(), rc); - +} if (JK_IS_DEBUG_LEVEL(conf->log)) jk_log(conf->log, JK_LOG_DEBUG, "Initialized %s", JK_FULL_EXPOSED_VERSION); JK_TRACE_EXIT(conf->log); @@ -3320,8 +3321,9 @@ static int init_jk(apr_pool_t * pconf, j "Using default %s", jk_shm_file); } #endif -if (jk_shm_size == 0) +if (jk_shm_size == 0) { jk_shm_size = jk_shm_calculate_size(jk_worker_properties, conf->log); +} else if (jk_shm_size_set) { jk_log(conf->log, JK_LOG_WARNING, "The optimal shared memory size can now be determined automatically."); @@ -,11 +3335,11 @@ static int init_jk(apr_pool_t * pconf, j jk_cleanup_shmem, apr_pool_cleanup_null); } -else +else { jk_log(conf->log, JK_LOG_ERROR, "Initializing shm:%s errno=%d. Load balancing workers will not function properly.", jk_shm_name(), rc); - +} /* we add the URI->WORKER MAP since workers using AJP14 will feed it */ worker_env.uri_to_worker = conf->uw_map; @@ -3400,7 +3402,8 @@ static int jk_post_config(apr_pool_t * p #endif apr_pool_userdata_set((const void *)jk_log_lock, JK_LOG_LOCK_KEY, apr_pool_cleanup_null, s->process->pool); -} else { +} +else { jk_log_lock = (apr_global_mutex_t *)data; } Modified: tomcat/jk/trunk/native/iis/jk_isapi_plugin.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/iis/jk_isapi_plugin.c?rev=1201607&r1=1201606&r2=1201607&view=diff == --- tomcat/jk/trunk/native/iis/jk_isapi_plugin.c (original) +++ tomcat/jk/trunk/native/iis/jk_isapi_plugin.c Mon Nov 14 06:35:49 2011 @@ -1372,7 +1372,8 @@ static int JK_
svn commit: r1201608 - in /tomcat/trunk/java/org/apache: catalina/loader/WebappLoader.java jasper/servlet/JspServlet.java naming/factory/DataSourceLinkFactory.java
Author: kkolinko Date: Mon Nov 14 06:48:46 2011 New Revision: 1201608 URL: http://svn.apache.org/viewvc?rev=1201608&view=rev Log: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown: process exceptions thrown from Constructor.newInstance(). In DataSourceLinkFactory: unwrap exception from within InvocationTargetException. Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java Modified: tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java?rev=1201608&r1=1201607&r2=1201608&view=diff == --- tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java (original) +++ tomcat/trunk/java/org/apache/catalina/loader/WebappLoader.java Mon Nov 14 06:48:46 2011 @@ -603,6 +603,7 @@ public class WebappLoader extends Lifecy .registerComponent(classLoader, cloname, null); } catch (Throwable t) { +t = ExceptionUtils.unwrapInvocationTargetException(t); ExceptionUtils.handleThrowable(t); log.error( "LifecycleException ", t ); throw new LifecycleException("start: ", t); Modified: tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java?rev=1201608&r1=1201607&r2=1201608&view=diff == --- tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java (original) +++ tomcat/trunk/java/org/apache/jasper/servlet/JspServlet.java Mon Nov 14 06:48:46 2011 @@ -104,6 +104,7 @@ public class JspServlet extends HttpServ Object[] args = { config, context }; options = (Options) ctor.newInstance(args); } catch (Throwable e) { +e = ExceptionUtils.unwrapInvocationTargetException(e); ExceptionUtils.handleThrowable(e); // Need to localize this. log.warn("Failed to load engineOptionsClass", e); Modified: tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java?rev=1201608&r1=1201607&r2=1201608&view=diff == --- tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java (original) +++ tomcat/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java Mon Nov 14 06:48:46 2011 @@ -76,6 +76,18 @@ public class DataSourceLinkFactory exten DataSourceHandler handler = new DataSourceHandler((DataSource)datasource, username, password); return proxyConstructor.newInstance(handler); }catch (Exception x) { +if (x instanceof InvocationTargetException) { +Throwable cause = x.getCause(); +if (cause instanceof ThreadDeath) { +throw (ThreadDeath) cause; +} +if (cause instanceof VirtualMachineError) { +throw (VirtualMachineError) cause; +} +if (cause instanceof Exception) { +x = (Exception) cause; +} +} if (x instanceof NamingException) throw (NamingException)x; else { NamingException nx = new NamingException(x.getMessage()); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
svn commit: r1201609 - in /tomcat/jk/trunk/native/common: jk_connect.c jk_lb_worker.c jk_util.c
Author: mturk Date: Mon Nov 14 06:49:34 2011 New Revision: 1201609 URL: http://svn.apache.org/viewvc?rev=1201609&view=rev Log: Fix code style. No functional change Modified: tomcat/jk/trunk/native/common/jk_connect.c tomcat/jk/trunk/native/common/jk_lb_worker.c tomcat/jk/trunk/native/common/jk_util.c Modified: tomcat/jk/trunk/native/common/jk_connect.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_connect.c?rev=1201609&r1=1201608&r2=1201609&view=diff == --- tomcat/jk/trunk/native/common/jk_connect.c (original) +++ tomcat/jk/trunk/native/common/jk_connect.c Mon Nov 14 06:49:34 2011 @@ -372,8 +372,9 @@ int jk_resolve(const char *host, int por temp_sa = temp_sa->next; /* if temp_sa is set, we have a valid address otherwise, just return */ -if (NULL != temp_sa) +if (NULL != temp_sa) { remote_sa = temp_sa; +} else { JK_TRACE_EXIT(l); return JK_FALSE; Modified: tomcat/jk/trunk/native/common/jk_lb_worker.c URL: http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_lb_worker.c?rev=1201609&r1=1201608&r2=1201609&view=diff == --- tomcat/jk/trunk/native/common/jk_lb_worker.c (original) +++ tomcat/jk/trunk/native/common/jk_lb_worker.c Mon Nov 14 06:49:34 2011 @@ -161,12 +161,11 @@ int jk_lb_get_lock_code(const char *v) { if (!v) return JK_LB_LOCK_DEF; -else if (*v == 'o' || *v == 'O' || *v == '0') +if (*v == 'o' || *v == 'O' || *v == '0') return JK_LB_LOCK_OPTIMISTIC; -else if (*v == 'p' || *v == 'P' || *v == '1') +if (*v == 'p' || *v == 'P' || *v == '1') return JK_LB_LOCK_PESSIMISTIC; -else -return JK_LB_LOCK_DEF; +return JK_LB_LOCK_DEF; } /* Return the string representation of the lb method type */ @@ -180,18 +179,17 @@ int jk_lb_get_method_code(const char *v) { if (!v) return JK_LB_METHOD_DEF; -else if (*v == 'r' || *v == 'R' || *v == '0') +if (*v == 'r' || *v == 'R' || *v == '0') return JK_LB_METHOD_REQUESTS; -else if (*v == 't' || *v == 'T' || *v == '1') +if (*v == 't' || *v == 'T' || *v == '1') return JK_LB_METHOD_TRAFFIC; -else if (*v == 'b' || *v == 'B' || *v == '2') +if (*v == 'b' || *v == 'B' || *v == '2') return JK_LB_METHOD_BUSYNESS; -else if (*v == 's' || *v == 'S' || *v == '3') +if (*v == 's' || *v == 'S' || *v == '3') return JK_LB_METHOD_SESSIONS; -else if (*v == 'n' || *v == 'N' || *v == '4') +if (*v == 'n' || *v == 'N' || *v == '4') return JK_LB_METHOD_NEXT; -else -return JK_LB_METHOD_DEF; +return JK_LB_METHOD_DEF; } /* Return the string representation of the balance worker state */ @@ -205,22 +203,21 @@ int jk_lb_get_state_code(const char *v) { if (!v) return JK_LB_STATE_DEF; -else if (*v == 'i' || *v == 'I' || *v == 'n' || *v == 'N' || *v == '0') +if (*v == 'i' || *v == 'I' || *v == 'n' || *v == 'N' || *v == '0') return JK_LB_STATE_IDLE; -else if (*v == 'o' || *v == 'O' || *v == '1') +if (*v == 'o' || *v == 'O' || *v == '1') return JK_LB_STATE_OK; -else if (*v == 'r' || *v == 'R' || *v == '2') +if (*v == 'r' || *v == 'R' || *v == '2') return JK_LB_STATE_RECOVER; -else if (*v == 'f' || *v == 'F' || *v == '3') +if (*v == 'f' || *v == 'F' || *v == '3') return JK_LB_STATE_FORCE; -else if (*v == 'b' || *v == 'B' || *v == '4') +if (*v == 'b' || *v == 'B' || *v == '4') return JK_LB_STATE_BUSY; -else if (*v == 'e' || *v == 'E' || *v == '5') +if (*v == 'e' || *v == 'E' || *v == '5') return JK_LB_STATE_ERROR; -else if (*v == 'p' || *v == 'P' || *v == '6') +if (*v == 'p' || *v == 'P' || *v == '6') return JK_LB_STATE_PROBE; -else -return JK_LB_STATE_DEF; +return JK_LB_STATE_DEF; } /* Return the string representation of the balance worker activation */ @@ -241,14 +238,13 @@ int jk_lb_get_activation_code(const char { if (!v) return JK_LB_ACTIVATION_DEF; -else if (*v == 'a' || *v == 'A' || *v == '0') +if (*v == 'a' || *v == 'A' || *v == '0') return JK_LB_ACTIVATION_ACTIVE; -else if (*v == 'd' || *v == 'D' || *v == '1') +if (*v == 'd' || *v == 'D' || *v == '1') return JK_LB_ACTIVATION_DISABLED; -else if (*v == 's' || *v == 'S' || *v == '2') +if (*v == 's' || *v == 'S' || *v == '2') return JK_LB_ACTIVATION_STOPPED; -else -return JK_LB_ACTIVATION_DEF; +return JK_LB_ACTIVATION_DEF; } /* Update the load multipliers wrt. lb_factor */ @@ -981,8 +977,9 @@ static int get_most_suitable_worker(jk_w return -1; } } -if (p->lblock == JK_LB_LOCK_PESSIMISTIC) +
svn commit: r1201610 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/catalina/loader/WebappLoader.java java/org/apache/jasper/servlet/JspServlet.java java/org/apache/naming/factory/DataSourceLinkFactor
Author: kkolinko Date: Mon Nov 14 06:52:52 2011 New Revision: 1201610 URL: http://svn.apache.org/viewvc?rev=1201610&view=rev Log: Merged revision 1201608 from tomcat/trunk: Improve processing of errors that are wrapped into InvocationTargetException. Rethrow errors that must be rethrown: process exceptions thrown from Constructor.newInstance(). In DataSourceLinkFactory: unwrap exception from within InvocationTargetException. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java tomcat/tc7.0.x/trunk/java/org/apache/jasper/servlet/JspServlet.java tomcat/tc7.0.x/trunk/java/org/apache/naming/factory/DataSourceLinkFactory.java Propchange: tomcat/tc7.0.x/trunk/ -- --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Nov 14 06:52:52 2011 @@ -1 +1 @@ -/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,1174343,1174353,1174799,1174882,1174884,1174983,1175155,1175158,1175167,1175182,1175190,1175201,1175272,1175275,1175283,1175582,1175589-1175590,1175594,1175602,1175613,1175633,1175690,1175713,1175798,1175889,1175896,1175907,1176584,1176590,1176799,1177050,1177060,1177125,1177152,1177160,1177245,1177850,1177862,1177978,1178209,1178228,1178233,1178449,1178542,1178681,1178684,1178721,1179268,1179274,1180261,1180865,1180891,1180894,1180907,1181028,1181123,1181125,1181136,1181291,1181743,1182796,1183078,1183105,1183142,1183328,1183339-1183340,1183492-1183494,1183605,1184917,1184919,1185018,1185020,1185200,1185588,1185626,1185756,1185758,1186011,1186042-1186045,1186104,1186123,1186137,1186153,1186254,1186257,1186377-1186379,1186479-1186480,1186712,1186743,1186750,1186763,1186890-1186892,1186894,1186949,1187018,1187027-1187028,1187381,1187 753,1187755,1187775,1187801,1187806,1187809,1187827,1188301,1188303-1188305,1188399,1188822,1188930-1188931,1189116,1189129,1189183,1189240,1189256,1189386,1189413-1189414,1189477,1189685,1189805,1189857,1189864,1189882,1190034,1190185,1190279,1190339,1190371,1190388-1190389,1190474,1190481,1194915,1195222-1195223,1195531,1195899,1195905,1195943,1195949,1195953,1195955,1195965,1195968,1196175,1196212,1196223,1196304-1196305,1196735,1196825,1196827,1197158,1197261,1197263,1197299-1197300,1197305,1197339-1197340,1197343,1197382,1197386-1197387,1197480,1197578,1198497,1198528,1198552,1198602,1198604,1198607,1198622,1198640,1198696,1198707,1199418,1199432,1199436,1199513,1199529,1199980,116,1200056,1200089,1200106-1200107,1200263,1200316,1200320,1200398-1200399,1200445-1200446,1200555,1200627,1200696,1200725,1200937,1200941,1201069,1201087,1201180,1201235-1201237,1201508,1201521,1201542,1201545-1201546,1201548,1201555-1201556,1201568,1201576 +/tomcat/trunk:1156115,1156171,1156276,1156304,1156519,1156530,1156602,1157015,1157018,1157151,1157198,1157204,1157810,1157832,1157834,1157847,1157908,1157939,1158155,1158160,1158176,1158195,1158198-1158199,1158227,1158331,1158334-1158335,1158426,1160347,1160592,1160611,1160619,1160626,1160639,1160652,1160720-1160721,1160772,1160774,1160776,1161303,1161310,1161322,1161339,1161486,1161540,1161549,1161584,1162082,1162149,1162169,1162721,1162769,1162836,1162932,1163630,1164419,1164438,1164469,1164480,1164567,1165234,1165247-1165248,1165253,1165273,1165282,1165309,1165331,1165338,1165347,1165360-1165361,1165367-1165368,1165602,1165608,1165677,1165693,1165721,1165723,1165728,1165730,1165738,1165746,1165765,1165777,1165918,1165921,1166077,1166150-1166151,1166290,1166366,1166620,1166686,1166693,1166752,1166757,1167368,1167394,1169447,1170647,1171692,1172233-1172234,1172236,1172269,1172278,1172282,1172556,1172610,1172664,1172689,1172711,1173020-1173021,1173082,1173088,1173090,1173096 ,1173241,1173256,1173288,117,1173342,1173461,1173614,1173630,1173659,1173722,1174061,1174239,1174322,1174325,1174329-1174330,1174337-1174339,11743